Enum alias members: yay or nay?

Manfred Nowak svv1999 at hotmail.com
Sat Sep 7 19:50:08 PDT 2013


Andrej Mitrovic wrote:
> Or is it overkill and we should drop it?

This source of errors is the exact counterpart of a missing `break' in a 
`switch'-statement, which may result in an unintended fallthrough, thereby 
resetting some counter.

Therefore syntactical assurance of correctness in `enum's should be 
accompanied by syntactical assurance in `switch'es.

Until then and in those cases, where the implicit counter is indead 
decremented, an error might be exclaimed, because the subtraction indicates 
that the coder has lost the conciousness to code a _linear ordered_ enum.

-manfred


More information about the Digitalmars-d mailing list