...Or just rename enum

Bill Baxter dnewsgroup at billbaxter.com
Fri Dec 7 23:13:17 PST 2007


Another possibility occured to me.
Get rid of the keyword enum and replace it with something that would 
better describe the full scope of the new proposed usages.

For a time, we add a new keyword.  But slowly phase out enum.  Maybe 
issue deprecation warnings after 6 months, then make it a deprecation 
error after a year.  Something like that.

So what to call the new "enum" replacer?

"constant"?

And maybe the actual automatically numbered meaning of enum would have a 
slightly different syntax.  Something to say "hey enumerate these".  I 
think that can be done without another keyword.  If no other means then 
by a paren option like "constant(enum)".

Thoughts?

Really I have no problem merging the /concepts/ of enum and manifest 
constants.  That really does make sense.  The problem is just the actual 
keyword involved here.

--bb



More information about the Digitalmars-d mailing list