PhobosWatch: manifest => enum

Walter Bright newshound1 at digitalmars.com
Fri Dec 28 13:49:26 PST 2007


Steven Schveighoffer wrote:
> Consider this:
> 
> enum Foo { x = 'a' }
> 
> Now we remove Foo:
> 
> enum { x = 'a' }
> 
> Now x is a char, where Foo.x was an int?  That is very confusing.

C, C++, and D already work that way. Such are in common use, and I've 
not heard a complaint that it is very confusing. For example, it's in 
std.c.windows.windows.d (among many), and there's not been a single 
comment on it (pro or con) in 6 years in this n.g.

Extending it to allow heterogeneous types is not a big step, nor does it 
break any existing code or usage.



More information about the Digitalmars-d mailing list