PhobosWatch: manifest => enum

Walter Bright newshound1 at digitalmars.com
Fri Dec 28 12:41:26 PST 2007


Jérôme M. Berger wrote:
> 	I agree that "const (int)" and "int" should be different types.
> What I don't really see is why manifest constant need to be "int"
> rather than "const (int)". After all, any attempt to use one as
> non-const will fail (or should) so there's no real reason that they
> can't be "const (int)", is there?

Since one cannot take the address of a manifest constant, the 
requirement that it be immutable goes away, since it can never be an lvalue.



More information about the Digitalmars-d mailing list