On 24/12/2010, at 3:15 AM, john skaller wrote: > > There are two other ways to treat failed requirements. > A second mysterious way is: drop the symbol with the requirement silently. > The sane way is: reject the program with a diagnostic.
Ok, this is actually not so easy. In the process of binding a function we process its requirements. If these prove to be "false" meaning there's an explicit false or tag that can't be found, we can't just "fail to create the symbol" because this has no impact on binding functions that may call this function. We'd just get an failure "Can't find symbol" down the track, instantiating, or whatever. Also, we don't know if the function and its caller are actually used: initially we bind everything and garbage collect unused things later. So making the symbol "invisible" isn't so easy anyhow. The right way is to proceed with binding, and error out "down the track". On problem with this is to ensure the requirements *propagate* correctly during inlining, etc. This should work for bindings to C, since they can't be inlined until code generation phase. However the earliest detection is in the first optimisation, which is garbage collecting on the basis of usage. If the use closure of some function includes the "requirements no met" symbol then the program is in error provided there's no way to eliminate the dependency. -- john skaller skal...@users.sourceforge.net ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language