On 07/12/2010, at 1:22 PM, Erick Tryzelaar wrote: CC'd to Robert (his language is Magpie) since we've been discussing this recently..
> > Certainly. My job would be a lot easier if I had all the metalanguage > facilities I get from python but with pure values. This certainly has > influenced my desires to make felix much more pure functional :) What do you mean by "all the meta-language facilities" .. ? BTW: when you say "hash of the function" do you actually mean the function? Or application of the function? In Felix, you can assume a "function" has changed if the source file containing it changed. To make that rigorous, you'd have to add "and any dependencies". The compiler *knows* what all those dependencies are. Since the representation is "ocaml" until the C++ code is emitted, we can certainly "hash" the representation OR the C++ code. This will not give the same results as a Python hash would, since it would be sensitive to irrelevant changes, but it should be conservative (so we might do extraneous builds, but not miss doing some). Remember from the dim distant past .. Felix is basically supposed to be a dynamic language: support plugins etc. It is interesting even Ocaml has "method tables" for objects so Hash, Marshal, Comparel etc can work. Ocaml's are not enough (you can't stream abstract objects with Marshal for example). Most of the development so far has been to make a strongly statically typed language .. so most of the "meta-information" is in the compiler and not available at run time. My inclination here is to add features "on demand" instead of "by design". There is still a lot of static type stuff not supported, eg you can't compare unions for equality, not even enums, unless you write an equality yourself.. that sucks a bit .. :) Compared to Ocaml rtti, Felix has a big issue: rtti objects are flat, except for varrays. If you have a structure, you have a descriptor telling you where all the pointers are in that struct. What you don't have is a tree, telling you that same information by recursively examining the included shapes. Instead, the recursive analysis is done by the compiler and the flattened representation emitted. This is basically a) for performance b) to elide the necessity of generating huge numbers of rtti objects c) to avoid me having to design a run time tree representation d) to avoid making the gc scan that tree (work to make it work, and a lot more work to make it efficient). Don't forget, we have to handle unions (alternatives) as well as structures (sequences) .. and functions. Note also (e) since we use C++ destuctors, we're delegating the recursion for destructors to C++. It is hard to do that AND also have a run time aggregate destructor and not get the two things mixed up. -- john skaller skal...@users.sourceforge.net ------------------------------------------------------------------------------ What happens now with your Lotus Notes apps - do you make another costly upgrade, or settle for being marooned without product support? Time to move off Lotus Notes and onto the cloud with Force.com, apps are easier to build, use, and manage than apps on traditional platforms. Sign up for the Lotus Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language