Re: "Try? There is no try." -- Yoda's Exception handling syntax
[email protected] (Barrie Slaymaker) Wed, 16 Aug 2000 11:10:35 -0400
| Newsgroups | perl.perl6.language.flow |
|---|---|
| Message-ID | <[email protected]> |
[email protected] wrote: > > It basically allows the programmer to "try" a certain action and see what the > effects are going to be (i.e. handle the exception) so that some action can > then be taken based on the results of the exception. Seems like any BLOCK could be an implicit eval {...} or try {...}, with the exception handling stuff triggered by following catch or (finally|cleanup) blocks: { kaboom ; } catch blah { } cleanup { } This is like BLOCKs-as-loops. Personally the extra 3 or 4 letters to spell eval or try don't matter that much to me, and it would make some folks feel more at home. Though they could be optional, like 'return' before the final expression in a sub. - Barrie