final switch and straight integers

Bastiaan Veelo via Digitalmars-d digitalmars-d at puremagic.com
Wed Apr 20 00:18:55 PDT 2016


On Wednesday, 20 April 2016 at 06:36:01 UTC, bearophile wrote:
> Dominikus Dittes Scherkl:
>
>> final switch makes no sense on things that are not enumerated. 
>> Even on ubyte almost nobody will ever list all 256 cases, not 
>> to mention larger types.
>
> It's easy to cover all the values in a switch, using ranges.

2. No CaseRangeStatements are allowed.


More information about the Digitalmars-d mailing list