Felix currently generates C/C++ callable dynamically loadable objects. They can be used as a program using flx_run as a mainline driver.
However, such modules can't inter-call each other, despite the export directive, because there are no interfaces. In addition, there are some constraints on a library. Since Felix uses a gc, and it is passed in a 'thread frame' object, library functions need to be passed that object. But this means libraries cannot contain any "global" variables, at least as long as it shares its thread frame object. [Because all these object cannot agree where in the thread frame to put them]. One way to generate a library (safely) is to put a declaration: library; in the library mainline. Another way would be a compiler switch: flxg --library ... This basically errors out if any global variables are instantiated. Note that a library may still need initialisation for static variables, for example strings generated from null terminated char arrays (that is, Felix string literals). Felix currently doesn't allow explicit static (i.e. global in the C sense) variables, not even constants. But you can make them with C bindings anyhow:) Another effect of a library would be to generate an interface (Felix interface!) Interfaces are complicated quite a bit by the need to recursively define all the types involved, including possibly C bindings. The actual interfaces for functions would also be C bindings. for generated types, this is a problem since the Felix name is usually incomprehensible, therefor the client has to export many types with sensible names. This is a problem if two libraries then require the same type. I do not know how to solve this: basically we need a standard "name mangling" algorithm, but that just identifies a duplication, instead of ensuring no duplication. This really matters a LOT for structural types like tuples. -- john skaller skal...@users.sourceforge.net ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language