shouting versus dotting

Jason House jason.james.house at gmail.com
Sun Oct 5 16:12:02 PDT 2008


Andrei Alexandrescu wrote:

> Leandro Lucarella wrote:
>> "enum" as the way to declare manifest constants were much more ugly than
>> "!(", and most of the people were against it. I don't see why ".(" should
>> be introduced.
> 
> Ugly or not, enumerated symbols were manifest constants to begin with.
> That's kinda hard to argue against because it's a sheer fact.

Even before we expanded enums, I hated how there was no toString() for enum
types.  Walter explained this was because bit masks made it difficult. I
like using enums for a restricted set of options.  That'd allow the
compiler to provide toString and catch misuse in switch statements...
Including when I add or remove allowed values.



More information about the Digitalmars-d mailing list