Manifest constants - why not 'alias' ?

Robert Fraser fraserofthenight at gmail.com
Thu Dec 6 18:10:57 PST 2007


Walter Bright wrote:
> Bill Baxter wrote:
>> Enum is short for 'unumeration'.  But manifest constants aren't 
>> enumerating anything.  It makes no sense.
> 
> Because we already use enums to declare constant values.
> 
> enum { x = 3 }

Will enum be able to work as a modifier as in:

enum
{
     int x = 3;
     auto y = "hello";
}

...?

Also, unrelated, will there be a way to declare a class variable that is 
constant after construction (it is assigned once in the constructor, 
then doesn't change)?



More information about the Digitalmars-d mailing list