[eeps] Request for comments on EEP-25 "Unnesting cases"

Andras Georgy Bekes bekesa@REDACTED
Wed Jan 7 16:08:18 CET 2009


> try      C1 of P1 -> B1
> ; or try C2 of P2 -> B2
> catch X -> Y
> after A
> end
>
> If I were the reader of this code, I'd think that exceptions are
> caught in both C1 and C2. However, if we extract the nested try
> expression, (i.e. following the logic of the proposal), the above
> means:
>
> try C1 of true -> B1
> ;            _ -> try C2 of true -> B2 end
> catch X -> Y
> after A
> end

Or, if following the logic in another way, it could mean:

try C1 of true -> B1
;            _ -> try C2 of true -> B2
                  catch X -> Y
                  after A
                  end
end

Well, this is even less intuitive I think.

	Georgy



More information about the eeps mailing list