switch()

Walter Bright newshound2 at digitalmars.com
Mon Feb 17 19:53:15 PST 2014


On 2/17/2014 6:17 PM, Steven Schveighoffer wrote:
> How is this advantageous? It just seems annoying...

Because it makes the programmer's intent clear - are all the cases accounted 
for, or are there defaults?

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.



More information about the Digitalmars-d mailing list