[Nix-dev] Re: Proposal: tryCatch function

Michael Raskin 7c6f434c at mail.ru
Tue Jan 6 10:46:56 CET 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Eelco Dolstra wrote:
>>> 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.

We already do not have total cleanness for expressions containing
errors. So tryRethrow will leave us better off. On the other hand, I
agree with you that clean semantics for the cases where derivation is
successfully produced is more important than anything because it is a
part of the perceived goal of Nix.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQEcBAEBAgAGBQJJYyiPAAoJEE6tnN0aWvw3lJEIAJI8zpJAkufPhoycweAnKvxp
QBRfT2Jcx2LgMtrGvhmEjiwOtaLLcJYRL2WFnqfRaDnBlq2BF0y2M5UXoO8aXqX5
88IfZ6q7KrkPB0ed5ijmcEdw6c3owAzHylRZ3fsW9hRbazNivLT/hbzvPzeefugu
Yb5xCQhP6qKUnMqmiZMPYe1KZzgE8JtsPQ1brdGI6pUW+xb8gYmfgH6rln7LfDfr
kOaaosIiRk74vfZO3Ld2S9LE2OHkK0xdLLuHfdlWL1UGIwHMOBeUle6Hr291onEw
3m/NFufKnpjvmLSUgWrNDW9YvceRKxN2rcHpw/QNdN3BE+PVXR85BwtH6eZAw1o=
=+xKr
-----END PGP SIGNATURE-----



More information about the nix-dev mailing list