Switch-case made less buggy, now with PATCH!
Tim Matthews
tim.matthews7 at gmail.com
Fri Nov 20 21:10:49 PST 2009
Chad J wrote:
> http://d.puremagic.com/issues/show_bug.cgi?id=3536
>
> So Walter, with this you can keep your beloved fall-through.
> Now can the rest of us be spared the nasty fall-through bugs, please
> please please??
>
> Also, about assert(0)... I'd be happy to change what I did if Walter and
> associates feel that adding assert(0) to the list is worth its minor
> complications.
>
> (Sorry I don't have a patch for properties, but that one's harder.)
>
> - Chad
I like having both fall through and breaking out explicit but was the
final syntax ever discussed here first?
Other possible options include 'fallthrough;' or just have the usual
goto case for falling through too and let the compiler's optimization
routines remove the unnecessary jumps when it sees the goto case as the
next in sequence.
More information about the Digitalmars-d
mailing list