Manifest constants - why not 'alias' ?

Bill Baxter dnewsgroup at billbaxter.com
Fri Dec 7 13:57:15 PST 2007


Janice Caron wrote:
> On 12/7/07, Leandro Lucarella <llucax at gmail.com> wrote:
>> That's the worst reason ever! There are so many things we already use that
>> sucks...
> 
> Yep, I agree with everyone. Especially with the above comment. I will
> certainly /stop/ writing enum { x=3 } if a more intuitive way comes
> along.
> 
> So there you have it, Walter: Unanimous support on this newsgroup
> (...is that unprecedented?...) for NOT using enum as a storage class
> to define compile-time constants.
> 
> We all seem to be cool with the concept, just not with the word
> "enum". My fave is "final", but I'd be happy with any of the other
> alternatives that have been suggested so far.

Agreed.  I really don't see why you wouldn't use final.  It seems 
perfect.  Walter just declared there would be no more final, so it's 
suddenly a keyword without much to do.  It's previous meaning as a head 
const storage class puts it in the right syntax category already.  So 
what's wrong with it?

--bb



More information about the Digitalmars-d mailing list