From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2005-04-30 16:09:09
"Iain K. Hanson" <ikh_at_[hidden]> wrote
> I really don't like macros. I have a hard time accepting boost PP but at
> least we have never before used macros in a way that means that they
> into user code.
I would probably have agreed with you on this just a year ago. Fortunately,
I've been using Boost PP pretty extensively for the last half a year, and my
opinion is totaly different now. I think macros, if used appropriately, is
a very powerful tool, and together with template metaprogramming represent
extremely powerful code generation facility.
Code generation will be here, like it or not. You don't like macros, but
what's the alternative? MFC wizards? IDL?
That's not to say that macros can't be used to obscure things. But any tool
may be either useful or harmful, depending on how it's used.
PS: I have a complicated feelings toward BOOST_FOREACH. I've read the
article, and I very much like the techniques being used, and how it's done.
I do have a problem with the rationale, however. I think both
std::for_each, as well as a plain old for loop are just fine, and I don't
see why BOOST_FOREACH is better. So, I will probably not use it, at least
not right away. But, apparently, many other people will (see the download
So I don't vote.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk