Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2005-05-08 20:00:07


"Andrei Alexandrescu (See Website For Email)" wrote

> Arkadiy Vertleyb wrote:
> > Is it "cumbersome"? I don't know -- is template
> > metaprogramming "cumbersome"? I really believe they are very much
alike.
> > Both were not in the initial design, both were later discovered, and
both
> > are now "glorified" by some people, and hated by the others.
>
> First, the degree of cumbersomeness depends on what those tools are used
> for. But that's a tautology.
>
> Second, I disagree that the template engine and the preprocessor are
> similar. I see very very little similarity. The former is a mean pure
> functional language fostering pattern matching, recursion, and sporting
> knowledge and high integration with the non-templated part of C++. The
> computational model is known and powerful. In contrast, programming
> based on the token-oriented preprocessor uses arcane idioms and
> computations, which IMO just takes us back 40 years. I don't find the
> two similar at all, except probably that they both are being used for
> things they weren't intended for :o).

I didn't talk about _similarity_ -- I talked about _analogy_, sorry if it
wasn't clear. I am not so strong in theory, and I don't know why
token-oriented ideoms are so bad, especially since they are used together
with other techniques rather than instead of them. All I see is that PP
allows me to solve some issues that I can't solve otherwise. Please give me
one good reason why I should not use it.

Regards,
Arkadiy


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk