
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of David Abrahams Sent: Wednesday, June 07, 2006 5:37 AM To: boost@lists.boost.org Subject: Re: [boost] [review] pqs
"David A. Greene" <greened@obbligato.org> writes:
It is also, IMHO, one of the best practical examples of template metaprogramming.
I just want to clear something up about this. It's not directed at PQS in particular, but at the whole domain of dimensional analysis as an example of TMP.
Dimensional analysis is really a very poor example of what TMP can do: interesting TMP involves some generation of code that actually "does something," as in the state machine example in C++TMP or Blitz++ expression templates or Boost.Lambda. Dimensional analysis basically only adds error messages where they wouldn't otherwise have been.
Then why is it such a prominent example in the documentation?

"Sohail Somani" <s.somani@fincad.com> writes:
Dave Abrahams wrote:
Dimensional analysis is really a very poor example of what TMP can do: interesting TMP involves some generation of code that actually "does something," as in the state machine example in C++TMP or Blitz++ expression templates or Boost.Lambda. Dimensional analysis basically only adds error messages where they wouldn't otherwise have been.
Then why is it such a prominent example in the documentation?
In what documentation? -- Dave Abrahams Boost Consulting www.boost-consulting.com

David Abrahams wrote:
"Sohail Somani" <s.somani@fincad.com> writes:
Dave Abrahams wrote:
Dimensional analysis is really a very poor example of what TMP can do: [...]
Then why is it such a prominent example in the documentation?
In what documentation?
Maybe this one: THE BOOST MPL LIBRARY [http://boost.org/libs/mpl/doc/index.html] Tutorial: Metafunctions and Higher-Order Metaprogramming (Note: The following material is an excerpt from Chapter 3 of "C++ Template Metaprogramming", by David Abrahams and Aleksey Gurtovoy) [http://boost.org/libs/mpl/doc/tutorial/tutorial-metafunctions.html] K. Fresl

Kresimir Fresl <fresl@grad.hr> writes:
David Abrahams wrote:
"Sohail Somani" <s.somani@fincad.com> writes:
Dave Abrahams wrote:
Dimensional analysis is really a very poor example of what TMP can do: [...]
Then why is it such a prominent example in the documentation?
In what documentation?
Maybe this one:
THE BOOST MPL LIBRARY
Oh, you mean the documentation of Boost.MPL! That documentation is not meant to describe the domain of metaprogramming, it's supposed to help make the MPL understandable.
Tutorial: Metafunctions and Higher-Order Metaprogramming
That tutorial is a very good example of how to work with the abstractions of the MPL. That doesn't mean it's representative of what metaprogramming can do. Those are two very different things. If I give you a tour of a workshop and show you how to use all the tools, it doesn't necessarily mean you've learned much about the kinds of things you can build in that workshop. Several later chapters in the book are devoted to giving people a better sense of what you can do with TMP. -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (3)
-
David Abrahams
-
Kresimir Fresl
-
Sohail Somani