Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Functional > Re: try ... fin...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 6 Topic 2776 of 2841
Post > Topic >>

Re: try ... finally ...

by Ian.Stark@[EMAIL PROTECTED] Feb 28, 2008 at 11:16 AM

"David B. Benson" <dbenson@[EMAIL PROTECTED]
> writes:
> On Feb 21, 6:05 am, rossb...@[EMAIL PROTECTED]
 wrote:
>> http://www.ps.uni-sb.de/alice/manual/sugar.html#finally
>
> Very nice!  Thank you.

There's a further refinement of this in the "exceptional syntax"
proposed by Benton+Kennedy in JFP 11(4):394-410

  http://dx.doi.org/10.1017/S0956796801004099
  http://research.microsoft.com/~akenn/sml/ExceptionalSyntax.pdf

where you want to identify code that runs only if an exception is not
raised.  Independently, Erlang introduced the same thing:

 try Expr of 
   Pattern1 [when Guard1] -> Body1;
   ...
 catch
   ExceptionPattern1 [when ExceptionGuard1] -> ExceptionBody1
   ...
 after
   FinalBody

The point is that the handler is wrapped only around Expr,
not Body1, whereas FinalBody applies to everything. 

  http://www.erlang.org/doc/reference_manual/expressions.html#try

  Carlsson et al., Proc. 2004 Erlang w'shop
  http://doi.acm.org/10.1145/1022471.1022475
  http://www.erlang.se/workshop/2004/exception.pdf

--
Ian Stark                           http://www.inf.ed.ac.uk/~stark
LFCS, School of Informatics, The University of Edinburgh, Scotland




 6 Posts in Topic:
try ... finally ...
"David B. Benson&quo  2008-02-20 15:10:04 
Re: try ... finally ...
"David B. Benson&quo  2008-02-20 16:34:34 
Re: try ... finally ...
rossberg@[EMAIL PROTECTED  2008-02-21 06:05:50 
Re: try ... finally ...
"David B. Benson&quo  2008-02-21 15:12:28 
Re: try ... finally ...
Ian.Stark@[EMAIL PROTECTE  2008-02-28 11:16:16 
Re: try ... finally ...
"David B. Benson&quo  2008-02-28 11:13:58 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 1:31:53 CDT 2008.