
"Andrei Alexandrescu (See Website For Email)" <SeeWebsiteForEmail@moderncppdesign.com> writes:
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.
These all sound like moral judgements. Are pattern matching and recursion "good" while token-oriented computation is "bad?" Or are you getting at something else? -- Dave Abrahams Boost Consulting www.boost-consulting.com