23 Sep 21:18
Re: TIP #329: Try/Catch/Finally syntax
From: Joe English <jenglish@...>
Subject: Re: TIP #329: Try/Catch/Finally syntax
Newsgroups: gmane.comp.lang.tcl.core
Date: 2008-09-23 19:18:40 GMT
Subject: Re: TIP #329: Try/Catch/Finally syntax
Newsgroups: gmane.comp.lang.tcl.core
Date: 2008-09-23 19:18:40 GMT
Twylite wrote: > > Thanks for the feedback. I've read through the paper and I agree that > there may be a value in supporting return codes in [try/catch] ... but > there will also be a cost. [...] > This is explicitly NOT the aim of TIP #329 - the exception handling > features of Tcl are adequate (ok, they're GREAT :) ), but the syntax > lacks readability in common cases (particular the acquire/use/close > resource handling idiom). The TIP seeks to define a new syntax - build > on top of the existing exception handling facilities - to make code more > readable in the common cases. [...] > This is the crux of Erlang's exception handling - the part that > distinguishes it from C, Java and the like - the ability to define a > "success continuation" that is outside the protection portion of code > (the try body) and which is executed on the successful completion of the > protected portion (where catch handlers are only executed in the case of > failure). Having a separate "success continuation" is what I most like about the Erlang model, since it makes it easier to write the acquire/use/close idiom. > 1) Does Tcl need a syntax for "success continuation", given that it is(Continue reading)
Seems like a plan is coalescing.
Donal.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
RSS Feed