From: Fredderic <mag...@gm...> - 2008-12-14 17:10:26
|
On Fri, 12 Dec 2008 02:08:40 +0200, Twylite <tw...@cr...> wrote: > Okay, I found some time to work on the reference implementation. > > Changes: > - 'throw' has behavior consistent with 'error'. The 'interp alias' > approach that was suggested behaves weirdly if you don't get the > arguments right, so the implementation is proc-based. > - removed the 'as {resultsVar optionsVar}' clause and introduced > per-handler variable assignment > - improved error messages > - improved behavior of '-during' > - added tests (there are just under 100 tests covering most aspects > of the functionality; more to come) > > Outstanding issues: > - In the case of a fallthrough body "-", to which variable(s) should > the outcome of the try body be assigned? Simplest solution: revert the decision about 'as {resultsVar optionsVar}' in the first place. Per-handler variables are redundant and add unnecessary complexity. Just set them once, they'll be available to all handler bodies, and the rest of the script from this point onwards, as anyone would expect. Simple, no surprised, no corner cases, and insanely efficient, plus forward-compatible if we ever get more useful handler matching. -- Fredderic The cost of living is going up and the chance of living is going down. -- Flip Wilson Debian/unstable (LC#384816) on i686 2.6.23-z2 2007 (up 11 days, 4:16) |