in light of recent bugs and discussion I'm thinking about changing the default evaluation strategy for *procedure* arguments to eager.
This may make procedures less efficient. If the argument accesses something the procedure modifies, the semantics may be indeterminate. The problem is that "in principle" the client doesn't know what the procedure modifies when, or when the argument is evaluated (or how many times .. :) This can't happen with functions because functions don't modify things. In principle generators should be treated the same. Note this doesn't solve all the problems for example passing a single pointer value in two arguments, the procedure can read one and write the other, in some indeterminate order. Felix doesn't have "restrict" like C does (and its a dubious idea anyhow because it doesn't apply to pointers *nested* in other data structures). Note that the client could fix this by simply passing a var, eg instead of p expr; write var x = expr; p x; or just p (var expr); So it isn't clear the change should be made. -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language