const again

sambeau please-dont-spam-sambeau at mac.com
Thu Dec 6 18:22:29 PST 2007


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.



More information about the Digitalmars-d mailing list