At 10:08 AM 8/16/00 -0400, Chaim Frenkel wrote:
>What in the simple methodology combined with Damian's switch monster,
>is missing?
>
>I'll hazard a guess that, if the complex syntax goes in and if there
>is no semantic issue, -internals will likely convert the complex
>version internally to a switch.
>
>So is it syntactical sugar or something that can't be done otherwise?
Actually a lot of it is syntactic sugar, but the part that can't be done
otherwise is the implicit rethrowing of exceptions. It's interesting that
the folk who want to reuse existing keywords and switch seem to be the same
people who don't want implicit rethrow.
If you use a switch statement and want implicit rethrow (and I do), then
your exception handler somehow has to look inside the switch to see if an
exception was handled. Even if that's possible, it implies a level of
incestuousness that isn't good; what if the programmer puts something
besides a switch in the catch/else block? Is it supposed to look inside
that too to figure out if the exception was caught?
--
Peter Scott
Pacific Systems Design Technologies