[bitc-dev] Benton/Kennedy try/let
Jonathan S. Shapiro
shap at eros-os.org
Thu Apr 22 11:10:04 PDT 2010
First, a syntax question: should we distinguish this with a keyword,
or simply extend the existing syntax of LET? That is, should it be:
TRY <binding>
IN body-expr
catch e1 => expr
...
catch eN => expr
otherwise => expr
or simply
LET <binding>
IN body-expr
[ catch e1 => expr
...
catch eN => expr
otherwise => expr ]
One issue here is: if we adopt the LET version, then LET probably
can't allow multiple bindings in a single LET form. Perhaps that can
be resolved, but SML and Haskell people don't seem to find that
burdensome.
There is one thing that I do find strange about this construct: the
scope of the try block is the binding, not the body expression.
More information about the bitc-dev
mailing list