Denis Koroskin wrote:
On Mon, 06 Jul 2009 22:48:07 +0400, Andrei Alexandrescu <seewebsiteforem...@erdani.org> wrote:

Chad J wrote:
Walter Bright wrote:
grauzone wrote:
No. Also, this final switch feature seems to be only marginally
useful, and normal switch statements do the same, just at runtime. So
much for "more pressing issues" but it's his language and not mine so
I'll shut up.
The final switch deals with a problem where you add an enum member in
one file and then have to find and update every switch statement that
uses that enum. There's no straightforward way to find them to ensure
the case gets added to each switch.

It's solving a similar problem that symbolic constants do.


The fall-through thing, though, is purely local and so much less of an
issue.
 huh?
 These bugs always take me no less than 2 hours to find, unless I am
specifically looking for fall-through bugs.

I agree. Probably a good option would be to keep on requiring break, but
also requiring the user to explicitly specify they want fallthrough in
the rare case when they do want it. I'd love to use "continue" for that
but it's already "occupied" by cases like while (...) switch (...).
Requiring !break or ~break would work but is a bit too cute. Adding a
new keyword or a whole new switch statement is too much aggravation. I
guess we'll have to live with it...


Andrei

Reuse goto?

I was thinking "continue case;"

But of course this discussion is pointless because it's bikeshed idontknow...

Reply via email to