Hello,
> p.49: "Though the C preprocessor is one of the most powerful
> features of C and C++, avoid using it." In contrast, many people
> still do:
> #define kGreen 1 instead of: const int kGreen = 1;
> #define SQUARE(x) ((x)*(x)) instead of using an inline function!
except that in the latter case the inline isn't the same as the macro unless a template is used as well. I have several macro's in my code, where function templates + a traits class would fit better, just so that it compiles under VC++6.
I agree that macro's are bad, I agree that portability is good, but the way I see it, one or the other has to give.
> Sorrowly, since some time I am no longer able to test my GUI code using
> CINT, I have to compile it with ACLiC in order to run it as macro.
I'll second that.
Best regards,
Wim
-- Wim.Lavrijsen_at_cern.ch -- WLavrijsen_at_lbl.gov -- www.lavrijsen.net "Stop making excuses for your software." --first step towards qualityReceived on Sat May 14 2005 - 02:57:31 MEST
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:08 MET