[Nix-dev] Re: Proposal: tryCatch function
Andres Loeh
andres.loeh at googlemail.com
Tue Jan 6 11:26:52 CET 2009
Mainly because of the already mentioned trickyness that exceptions in
lazy languages tend to escape their surrounding try-block, try-catch
is generally considered not a very useful construct in the face of laziness.
The escaping should not only be a problem for functions, but also for
any form of compound lazy data (i.e., attribute sets in the Nix language).
<religion>Exceptions in a pure language are evil and should be avoided,
not encouraged.</religion>
Regarding evaluation order (left-to-right or right-to-left or unspecified):
I doubt that Nix currently uses a nondeterministic strategy, so I
don't think it's a big problem in fixing that particular subproblem by
adopting left-to-right.
Cheers,
Andres
More information about the nix-dev
mailing list