Stage 1 of this job is nearing completion. There are a couple of design issues. Some operations such as static linking have two variants:
(a) a core one (that can link anything) (b) a more Felix oriented one that is meant for linking Felix code (b) can use (a). It basically adds in the static link thunk, and takes the core base filename. This is only an example. Dynamic link is much the same. Running a static link exe is standard, plus or minus environment variable to specify plugins and dynamic link libraries, but running a dynamic library requires a driver executable. A second issue is this: at the moment, each routine takes exactly the arguments it needs. However some things like the name of the tool, fixed switches, filename extensions, etc, are gleaned by "flx" from the library config record. So I could remove the related parameters and just pass a config record. And I could make a version that uses the standard config record (which just calls the previously mentioned variant). In all these routines there is probably further possibility of "bunching" variables into records. ==== In this code I have preferred record types over structs. One reason for this is that you can remove excess fields and also aggregate fields. If you use the right field names! For example: typedef V3 = (x:int, y:int, z:int); typedef V2 = (x:int, y:int); fun f(x:int, y:int) => x + y; var v3 = (x=1,y=2,z=3); println$ f (v3 :>> V2); SO you can basically make a "fat record" with stuff needed for multiple different functions, provided the field names are all suitably distinct when required, and common when required, and use coercions to pass the same record to all of them: this is just subtyping, done manually. You can also "add" records together: var v2 = (y=22, z=33); var v3' = extend v2 with (x=11) end; println$ f (v3' :>> V2); Finally you should note, Felix Java like objects are just special cases of records with all fields being functions. So all the above applies as well to objects. What's more you can mix and match objects are records freely (because objects ARE just records). -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language