define should be the keyword for manifest constants
Gilles G.
schaouette at free.fr
Thu Dec 13 07:10:02 PST 2007
"define" makes no sense if you want to declare a "const" member function.
It could be of great use for manifest constant, but you'd still have to find a word for other const cases...
Steven Schveighoffer Wrote:
> 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