|
From: Andreas L. <av...@lo...> - 2008-12-12 08:28:22
|
Twylite <tw...@cr...> wrote:
> - removed the 'as {resultsVar optionsVar}' clause and introduced
> per-handler variable assignment
An unfortunate decision that was rushed into the TIP just before voting.
Three reasons against it:
- Tcl's variables outlive their specific handler block. They even
outlive the whole try-construct. As such they are not at all
comparable to e.g. Java's try/catch where these variables
only exist inside their respective handler.
- Originally (with "as ..."), these variables would have been also
available in the finally block. Now, they are available
depending on whether and which other handler fired, and can
never be relied on.
- The (only now showing up) problem with "-".
Joe English <jen...@fl...> wrote:
> > Option #1: set the FOO case variables only; making sure the body works
> > correctly is the developer's problem
> Option #1 is what the TIP specifies should happen.
> > Option #2: set the BAR case variables only; the fact that the FOO
> > variables are left unset is a quirk of using the "-" syntax
Option #2a: make "-" be recognized in place of the variable list.
> I for one would not object to a corrigendum specifying
> option #2, but for now it's probably best to make the
> implementation match the specification.
If a corrigendum was still possible, I'd prefer:
Option #Omega: reinstate the "as"-clause.
I wonder, who of the voters had their vote depending on the
way of variable handling.
|