[MLton-user] Improved Exn.withEscape

Stephen Weeks sweeks at sweeks.com
Tue Aug 29 12:04:20 PDT 2006


> Obviously one can implement withEscape trivially on top of withLabel and
> exitTo:
...
> Perhaps it would be best to have both available.

That seems like a mistake -- two different equally powerful and
similar ways to do the same thing.

> I'm not too worried about introducing new nonfix top-level bindings
> as long as they define stuff that one could reasonably consider to be
> a part of the language (and I tend to think that control constructs
> like this qualify for that).

That makes sense.  Perhaps the extra syntax of exitTo actually
increases readability, since it draws attention to nonlocal control
flow and makes it easier to spot the pattern across different pieces
of code.



More information about the MLton-user mailing list