Boost logo

Boost :

From: Vesa Karvonen (vesa.karvonen_at_[hidden])
Date: 2001-07-21 17:24:51

C++ template metaprogramming is like programming in a primitive pure
functional programming language. Functional programming has been around for a
considerable time (Lisp was created in 1958 by John McCarthy) and lots of both
theoretical and practical knowledge on functional programming has since been

It seems to me that most current metaprogramming libraries for C++ have been
designed and developed without fully considering existing functional
programming knowledge. I think that C++ template metaprogramming could greatly
benefit from functional programming knowledge.

It seems to me that much of modern C++ and OO design is reinventing the
functional programming wheel. STL, for instance, basically offers some very
limited functional programming tools. Many design patterns such as Adapter,
Command, Observer, Virtual Proxy, Decorator, Builder, Template Method,...
benefit from functional programming and are often basically either built-in
features of modern functional programming languages or non advanced functional
programming idioms.

I'm thinking of polishing and submitting (just after I get the first version
of the PREPROCESSOR library ready for inclusion to Boost (and before I submit
libraries using the functionality)) a C++ template implementation of a
considerable subset of functionality from the built-in features and (standard)
libraries of some functional programming languages such as Haskell and CAML. I
will also intend to develop techniques for converting functional programming
designs into C++ template metacode.

- Thompson: Haskell: The Craft of Functional Programming
- Cousineau, Mauny: The Functional Approach to Programming
- Mast et al.: Functional Programming in Clean,
- Okasaki: Purely Functional Data Structures
- McNamara, Smaragdakis: FC++: Functional Programming in C++,
- Gamma et al.: Design Patterns
- Czarnecki, Eisenecker: Generative Programming
- Alexandrescu: Modern C++ Design
- Baker: Iterators: Signs of Weakness in Object-Oriented Languages,

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