const again
Christopher Wright
dhasenan at gmail.com
Thu Dec 6 19:00:07 PST 2007
sambeau wrote:
> sambeau Wrote:
>
>> Walter Bright Wrote:
>>
>>> I'd prefer to stay away from it
>>> because of the negative connotations of C's preprocessor.
>
> On reflection, I don't think that's a good reason at all.
> The principal of least surprise is, I feel, more important.
> 'enum' was, in my opinion, always a slightly dodgily named construct at the best of times.
> Enumeration, to me, implies more than one thing.
>
> I feel, with all due respect (and a lot of deference) :-), that you are being a language implementor, looking at the guts of your implementation and asking "what else is this like?" rather than asking yourself (as a language designer) and saying "how best can I express this concept using terms most people will understand".
>
> Enum is just weird in this respect. It feels wrong.
Well, there are anonymous enums, right? /me hasn't used enums in quite
some time.
So it's just letting you use all primitives with an enum, not just
arithmetic types.
More information about the Digitalmars-d
mailing list