From: Vesa Karvonen (vesa.karvonen_at_[hidden])
Date: 2001-11-28 08:23:26
From: "Andrei Alexandrescu" <andrewalex_at_[hidden]>
> First, let me make a half-joking prefatory remark. I've been scared to death
> of submitting Loki to boost because I feared that in a very short time I
> will become terribly unpopular with the boost community. That seems to be a
> self-fulfilling prophecy, and it's possible that this post materializes that
> prophecy :o).
According to MBTI tests I'm an INTJ (http://fuzzy.snakeden.org/intj/). I can
be very critical at times and have no respect for authority. When I criticize
something it means that I'm interested in the topic. Please do not take my
Typelists and template metaprogramming facilities have been developed
independently by many people. I personally have many strong opinions on how
they should be done. There were many things I didn't like about MPL a few
months ago. Although I haven't studied the latest versions carefully, MPL
seems to be moving into the right direction, IMO.
Template metaprogramming IS functional programming. Most C++ people here,
including me, have very little experience in FP. (I have been writing a
compiler in Ocaml for the past couple of months.) I strongly recommend reading
some introductory book on a modern FP language _before_ reinventing FP. I
would personally recommend reading Haskell: The Craft of Functional
Programming by Simon Thompson, ISBN 0-201-34275-8. Most FP languages, such as
Haskell and Ocaml, come with a rather comprehensive standard library/prelude.
The standard libraries are definitely worthy of careful study!
According to my understanding of the C++ template mechanism, it is actually
quite flexible in certain respects compared to modern FP languages. C++
template metaprogramming is certainly an order of magnitude more tedious than
programming in Haskell or Ocaml, for instance. However, it is very easy to
simulate many interesting features such as parameterized modules and algebraic
types. A few months ago I wrote a (very concise) specification of TMPL:
Template MetaProgramming _Language_, whose intent is to show how to do
structured (instead of ad-hoc) template metaprogramming. (It is not just a
specification of library primitives.) If I have enough time, I will probably
finish the document this year.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk