switch()

Daniel Murphy yebbliesnospam at gmail.com
Tue Feb 18 08:11:36 PST 2014


"Steven Schveighoffer"  wrote in message 
news:op.xbhfr5kreav7ka at stevens-macbook-pro.local...

> > Of course, no compiler can make you write correct code. But if you're 
> > going to write a default anyway, odds are you'll choose the right one.
>
> I think your anecdotal experience with exception specification in Java is 
> at odds with this expectation.
>
> We all know programmers who are faced with seemingly annoyance hoops to 
> jump through jump through them with the least possible effort.

It's not really the same, because silencing checked exceptions results in a 
solution that is worse than not having checked exceptions at all.  Here if 
the programmer takes the 'easy route' and sticks in a "default: break;" 
they're just getting the old behavior back. 



More information about the Digitalmars-d mailing list