Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2005-05-01 19:55:00

"Iain K. Hanson" <ikh_at_[hidden]> wrote

> > > Yes, but I thought boost was about quality C++ libraries and showing
> > > C++ practice.
> >
> > And, I hope, it is. However, what is "best C++ practice"? C++ is a
> > multi-paradigm language, and it enabes variety of techniques. IMO this
is a
> > strength of C++, and this is what makes it fun, as opposed to some
> > very popular, languages. I would even say this is _the_ strength of
> > So making best of these techniques is what makes best C++ practice.
> >
> Yes but I don't regard the preprocessor as a normally valid part of that
> multi-paradigm.

Why? We have a built-in code generation tool, what's wrong with this? Yes,
it needs to be improved, for example the lack of recursion is a real pain in
the neck. But still, it's very powerfull, and a lot of stuff can be done
with it (especially if Boost PP is involved) that otherwise would require
either manual repetition or some external code generation tool. Why to
abandon this possibility?

As far as code readability goes, let me say that template metaprogramming is
not very readable either (and therefore considered harmful by many people).
I think the reason is that we happen to work in a language where many things
are "discovered" rather than "invented". We have templates just to
implement typesafe containers, and then suddenly, out of nowhere, we have
template metaprogramming, and C++ becomes a two-dimensional language. We
have "ugly macros", and then we have preprocessor metaprogramming, which
adds yet another dimension.

Why things get discovered in C++ but don't get discovered in, say, Java?
Because the authors of C++ trust programmers to use the language correctly,
rather than trying to prevent mistakes by cutting off features. So,
contrary to many other popular languages, C++ is rich, flexible, and

And exciting.

Anyway, I am sure macros _are_ OK, if used appropriately. And giving the
C++ comunity the message that "macros are OK" would be a right thing
(although I think this message was already given some time ago).

> I am much more in agreement with the views expressed in D&E.

I am sorry, what is D&E?



Boost list run by bdawes at, gregod at, cpdaniel at, john at