I have found a way to compile, somewhat laboriously,
a complete list of all Posix functions (data types is another story ok? :)
Basically cut and paste from Open Group docs with some munging.
I'll use some mechanical rules to get a complete low level Felix API out of 
this.

Now, the issue that interests me is the extensions. All the functions are 
labelled
things like 

float       truncf(float);
long double truncl(long double);
[XSI][Option Start]
double      y0(double);
double      y1(double);
double      yn(int, double);
[Option End]


here XSI is a specific, optional, but standardised extension to posix.
There's a few of these, and a special one [CX] which means that its
posix extending C (not an extension to Posix).

Now, Felix has way to yank in the right header file when a function
is used:

        requires header "<file.h>";

for example. This means "if you use X definition, Y gets included too".
Simple dependency stuff.

But what do we do with Posix extensions like XSI?

My thought is that this is an ANTI-DEPENDENCY. :)

The idea is, all the functions are there and you can use them.
You can call an XSI function. Even on Windows :)

But then we have a compiler switch sort of like:

        --no-XSI

and that breaks your program if you're using any XSI feature.

The problem is that a positive indication "XSI is available" doesn't help
if you have a weird system (and aren't they all?) where SOME of XSI is
available. if we turn XSI-available ON, then this will compile but break
later. If we turn XSI off, it will break un-necessarily.

The problem is simple: the program doesn't depend on the whole of XSI.
Even if it does, that's fine, just proceed. If you want to ensure your code
runs on a machine without full XSI support your use -no-XSI.
That will break code that might run on your machine if it has
partial support: too bad. If the code passes you know it will run
whether or not XSI is supported.

Ok, so I'm not completely sure how to implement this although

if not no-XSI do
  header XSI;
done

.. fun f() .. requires XSI;

should do it, provided we can get no-XSI into the program from
the command line.

There is a similar thing I'm thinking of, a licence manager:

        --no-GPL

Ensures your code isn't plagued with GPL.

So basically: an anti-dependency is something you're not allowed
to depend on.

It may make sense to say:

        --allow-Posix

So now, this means "disallow everything *except* Posix".
So roughly you can write:

        Posix+ZMQ-XSI

This means, you cannot use anything except Posix (with all extensions)
plus ZMQ, minus XSI.

So once you put even one "positive" into the requirements, you have to
positively specify EVERYTHING you want. That sucks because people won't
have the faintest idea what API's they're using underneath.

--
john skaller
skal...@users.sourceforge.net





------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to