define should be the keyword for manifest constants

Steven Schveighoffer schveiguy at yahoo.com
Thu Dec 13 06:21:20 PST 2007


Seriously.  Are we too concerned about stigmas to not use the absolute best 
word for defining a constant?  Even in the description of a manifest 
constant, it will be something like:

to *define* a manifest constant, use enum

If you use *define* you don't even need an explanation!

If you are concerned about people not liking define because it *looks* too 
much like C's #define, then lets also drop goto (because C's is just too 
error prone), class (because there are slicing problems in C++, and we don't 
want people to think they still exist in D), struct (because C++'s is just 
like class, so people will think D structs and classes are the same), etc.

If you are concerned about adding a new keyword, please, all coders who have 
used the symbol define, please respond to this thread, and we'll send you a 
handy script that will update your code to use another keyword of your 
choice.  Only $6.95 shipping and handling.

-Steve 





More information about the Digitalmars-d mailing list