From: Jesper Louis Andersen <jesper.louis.andersen@gmail.com>
To: Yaron Minsky <yminsky@janestreet.com>
Cc: Markus Mottl <markus.mottl@gmail.com>,
Jeremy Yallop <yallop@gmail.com>, Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] Proposal: extend try to handle success
Date: Wed, 5 Feb 2014 17:04:25 +0100 [thread overview]
Message-ID: <CAGrdgiVw7kyN1wxa13EQQt-sW1wwNNuBQ4c_aGUauCZydQrF_g@mail.gmail.com> (raw)
In-Reply-To: <CACLX4jQ4wLF+24Noq-gE78+jLKWgvP1MRWJVmVHYk+AObM5wVw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 524 bytes --]
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.
[-- Attachment #2: Type: text/html, Size: 1272 bytes --]
next prev parent reply other threads:[~2014-02-05 16:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-04 17:00 Jeremy Yallop
2014-02-04 17:14 ` Simon Cruanes
2014-02-04 18:09 ` Jeremy Yallop
2014-02-04 19:05 ` Gabriel Scherer
2014-02-04 19:18 ` Markus Mottl
2014-02-04 19:29 ` Markus Mottl
2014-02-04 19:42 ` Yaron Minsky
2014-02-05 16:04 ` Jesper Louis Andersen [this message]
2014-02-06 10:58 ` Goswin von Brederlow
2014-02-06 11:10 ` Ben Millwood
2014-02-10 8:47 ` Goswin von Brederlow
2014-02-10 9:23 ` Ben Millwood
2014-02-10 14:39 ` Alain Frisch
2014-02-06 11:36 ` Jeremy Yallop
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGrdgiVw7kyN1wxa13EQQt-sW1wwNNuBQ4c_aGUauCZydQrF_g@mail.gmail.com \
--to=jesper.louis.andersen@gmail.com \
--cc=caml-list@inria.fr \
--cc=markus.mottl@gmail.com \
--cc=yallop@gmail.com \
--cc=yminsky@janestreet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).