macros: type save, or what?

0ffh spam at frankhirsch.net
Tue Sep 11 12:22:22 PDT 2007


Janice Caron wrote:
> On another thread, I argued that
> const T name = value;
> 
> should be the appropriate syntax for declaring constants. But I have
> nothing against macros in general.

I don't see why a const should be different from a literal when it comes
to type checking, and a literal is what you'll effectively get, when you
use "macro a=5;" or whatever.

Anyways, this tread goes a bit beyond what we had in "Const sucks", that
is why I gave it its own name... :)

Regards, Frank



More information about the Digitalmars-d mailing list