For "Unix" I'm thinking: how to get around the mess of variants?

The answer is: follow the standards, in particular:

http://www.unix.org/single_unix_specification/

has a list of all the unix functions, flagged by which standards support them.

Now, suppose we do:

proc _exit: int -> void = "_exit($1)" requires POSIX or XSI or U03;

then the function is included if and only if the requires condition is
met, as if one did conditional compilation

if POSIX or XSI or U3 do
..
done

where the boolean constants POSIX, XSI etc etc are set somewhere,
generally in configuration, but the user could set them too if cross compiling,
or wanting to restrict the code so it worked on certain platforms.

If you also had say:

proc _somefun:1 int -> void = " .. " requires POSIX or U98;

and you did

proc myproc() { _somefun 1; _exit 1; }

then the deduced requirement is

(POSIX or XSI or U03) and (POSIX or U98)

which comes down to POSIX.

Then, given any particular piece of user code one could predict if it would
work with a certain set of tags. The tags could also be used to control
licences in a similar fashion.

Anyhow, one could then slavishly copy the 

http://www.unix.org/version4/GS5_APIs.pdf

to provide a "complete" library which could be filtered on tags..
this is similar to conditional compilation, but a bit better principled.

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





------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to