Manifest constants (was const again)
John Reimer
terminal.node at gmail.com
Sat Dec 8 08:42:55 PST 2007
Walter Bright wrote:
> Bill Baxter wrote:
>> Just like in D we have float[] x as the improved syntax and float x[]
>> as legacy syntax, we could have both "alias Y=X" as new-and-improved
>> and "alias X Y" as an aid to porting. As for being confusing, doing
>> it the wrong way is going to be a compiler error, so I don't think
>> it's a big deal.
>
> Looking it in the light of trying to avoid:
> enum int Y = X;
> I think it is a big deal. The enum form wouldn't have any obvious
> problems like that.
May I ask what Andrei Alexandrescu's opinion is of using 'enum' as
manifest const? Seems to me that this choice wouldn't pass unnoticed by
him, and I know he has some small influence on D. :-)
-JJR
More information about the Digitalmars-d
mailing list