Functional programming is a technique which enables the formulation of functions which can be combined in order to form compound functions. Finally, one of these functions is applied to the desired data structure. This function contains all relevant information required to determine, e.g., a discretized equation. A formalism can be obtained with which discretization operations can be carried out.
In C++ [23] different libraries have been developed which use object-oriented and generic programming [24] methods in order to emulate functional programming. The basic concept which makes functional programming possible in C++ is the function object [23] or functor. The standard template library [25] which is an integral part of C++ offers very basic methods for the implementation of function objects, such as binders and higher order functions. The lack of operator overloading makes the use of the functional parts of the STL rather cumbersome and inconcise for the specification.
The Boost Lambda library [26,27] offers basic functionality like operator overloading, partial function evaluation, higher order functions, and unnamed variables. The FC++ library [28] offers the treatment of functions of arbitrary order.
The Boost Phoenix 2 library [29] which is used for the implementation of frameworks offers explicitly named variables which extremely eases the implementation of accumulation operations required for the discretization and assembly of differential equations. Furthermore, it offers access to arbitrary containers, the implicit use of C++ loops, and conditional expressions.
Michael 2008-01-16