[Nix-dev] Re: Proposal: tryCatch function

Nicolas Pierron nicolas.b.pierron at gmail.com
Tue Jan 6 10:24:30 CET 2009


On Tue, Jan 6, 2009 at 10:06, Michael Raskin <7c6f434c at mail.ru> 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".

> What about ({x,y}:...) {x=(throw "x"); y=(throw "y");} ?

none, because you have to specify set.x or set.y, otherwise this
depends on the order of evaluation of the entire set.

-- 
Nicolas Pierron
http://www.linkedin.com/in/nicolasbpierron
- If you are doing something twice then you should try to do it once.



More information about the nix-dev mailing list