PhobosWatch: manifest => enum
Walter Bright
newshound1 at digitalmars.com
Fri Dec 28 13:21:50 PST 2007
Jérôme M. Berger wrote:
> Right. Replace "const" by "invariant" in my comment and the main
> point still stands: couldn't the compiler determine automatically if
> we take the address of an invariant variable and allocate memory for
> it or not based on that? This would remove the need for a special
> keyword/syntax for manifest constants: just declare them as
> "invariant" and let the compiler do the work.
Yes, that could be done, but we're still stymied by the problem that we
are unable to declare a constant of type 'int', only 'const(int)'.
More information about the Digitalmars-d
mailing list