define should be the keyword for manifest constants

Steven Schveighoffer schveiguy at yahoo.com
Thu Dec 13 09:07:55 PST 2007


"Gilles G." wrote
> "define" makes no sense if you want to declare a "const" member function.

I was not talking about using define instead of pure for *everything* that 
pure is for.  Use pure for function declarations.  Use define for manifest 
constants.

> It could be of great use for manifest constant, but you'd still have to 
> find a word for other const cases...

what's wrong with the current keywords?  const, invariant, pure, etc?  I'm 
talking about having define *only* for manifest constants, and nothing else.

Every once in a while, there comes a time where a new keyword not only makes 
sense, but is the only true fit.  I believe this is one of those times.

-Steve 





More information about the Digitalmars-d mailing list