|
Boost : |
From: Iain K. Hanson (ikh_at_[hidden])
Date: 2005-04-30 19:48:50
On Sat, Apr 30, 2005 at 02:09:09PM -0700, Arkadiy Vertleyb wrote:
> "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
> proliferate
> > 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.
Yes, but until now boosters have kept PP to the implementation of libraries
not pushing it out into user code. And PP does obscifate code for those
of us that like to look at the implementation of libraries in order to learn.
I have a great deal of respect for the PP authors/mainters but it is still
textual substitution so why not awk or python scripts.
>
> Code generation will be here, like it or not. You don't like macros, but
> what's the alternative? MFC wizards? IDL?
Yes, but I thought boost was about quality C++ libraries and showing best
C++ practice.
>
> 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.
>
> Regards,
> Arkadiy
>
> 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
> counter).
>
> So I don't vote.
Which I respect.
Regards
/ikh
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk