switch()

Walter Bright newshound2 at digitalmars.com
Sun Feb 16 12:15:01 PST 2014


On 2/16/2014 12:06 PM, Jacob Carlborg wrote:
> On 2014-02-16 21:03, Walter Bright wrote:
>
>> It originally was not required, but there was a campaign by a lot of D
>> users to make it required to deal with the common bug of adding a value
>> in one switch statement but forgetting to add it to another
>> corresponding one.
>
> Isn't that what final switches are for?

Final switches only help for enums.

 > Or are default statements not allowed in final switches at all?

Right, they aren't.


More information about the Digitalmars-d mailing list