final switch and straight integers

Dominikus Dittes Scherkl via Digitalmars-d digitalmars-d at puremagic.com
Tue Apr 19 22:46:00 PDT 2016


On Tuesday, 19 April 2016 at 22:04:21 UTC, Stefan Koch wrote:
> On Tuesday, 19 April 2016 at 14:53:18 UTC, Steven Schveighoffer 
> wrote:
>
>>or we
>> should do away with requiring handling all enum cases.
>
>
> Are you suggesting getting rid of final switch ?

No - I think he suggests to error out if final switch is used on 
something other than enums.

I support this suggestion, 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.


More information about the Digitalmars-d mailing list