Chad J wrote:
So, switch-case statements are a frequent source of nasty bugs. Fixing
them (well) requires breaking backwards compatibility.
Any chance this will happen for D2?
(This is intended as more of a reminder and simple curiosity than a
discussion.)
The correct way to solve this is to create a new switch-case statement
that doesn't suck. It would use a different syntax, and support spiffy
stuff like pattern matching. If you wanted to use duff's device or need
C compatibility, you still could use the old switch-case.