c++boost.gif (8819 bytes)HomeLibrariesPeopleFAQMore

2. Pure Functional Programming

Many of the functions and data types in the FC++ library are designed to mimic those in the Haskell programming language. Haskell is a pure functional programming language: there are no effects, global variables, or destructive updates in the language. Programming in this pure style ensures referential transparency.

The FC++ library uses this "pure" style for the most part. All parameters to FC++ functoids are passed by const& by default, for example. Nevertheless, since this is C++, you can use FC++ to create side-effecting functoids in a number of ways, which we will see later (Section 8). The introductory examples will all be effect-free, however.

Last revised: October 03, 2003 at 23:27:22 GMTCopyright 2000-2003 Brian McNamara and Yannis Smaragdakis