Nicolas Pierron wrote: > On Tue, Jan 6, 2009 at 10:06, Michael Raskin <[email protected]> wrote: >> Nicolas Pierron wrote: >>> There throw should not throw an exception in the C++ code but it >>> should just return a normal form. >>> >>> throw "foo": is a normal form >>> (throw "foo") + "bar" : is not a normal form and it returns throw "foo". >>> >>> This remove the problem of the evaluation order I guess. >> What should >> (throw "foo") + (throw "bar") >> return? > > Usually, you start reading a string by the left-hand side, therefore, > I would say: throw "foo".
Which was exactly what I meant with evaluation order :-) The language semantics don't specify in what order arguments are evaluated, so it might also be `throw "bar"'. Of course we could say that useful error messages are more important than a "clean" semantics, but it's still a concern. -- Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/ _______________________________________________ nix-dev mailing list [email protected] https://mail.cs.uu.nl/mailman/listinfo/nix-dev
