On Tue, Feb 4, 2014 at 8:42 PM, Yaron Minsky <yminsky@janestreet.com> wrote:
I very much agree!  I find the symmetry between try and match to be
quite elegant.  Overall, this seems like a great proposal.

Erlang has had a construction like this for some years now.

try Expr of
  Pat1 -> Clause1;
  Par2 -> Clause2;
  ...
catch
  Class:Error ->
    ...
end

Of notable semantics, the exception only reaches over the scope of Expr and not over ClauseN. In practice, I have used it quite often in Erlang-code.


--
J.