Functional programming with the FC++ library

14Citations
Citations of this article
12Readers
Mendeley users who have this article in their library.

Abstract

We describe the FC++ library, a rich library supporting functional programming in C++. Prior approaches to encoding higher order functions in C++ have suffered with respect to polymorphic functions from either lack of expressiveness or high complexity. In contrast, FC++ offers full and concise support for higher-order polymorphic functions through a novel use of C++ type inference. The FC++ library has a number of useful features, including a generalized mechanism to implement currying in C++, a "lazy list" class which enables the creation of "infinite data structures", a subtype polymorphism facility, and an extensive library of useful functions, including a large part of the Haskell Standard Prelude. The FC++ library has an efficient implementation. We show the results of a number of experiments which demonstrate the value of optimizations we have implemented. These optimizations have improved the run-time performance by about an order of magnitude for some benchmark programs that make heavy use of FC++ lazy lists. We also make an informal performance comparison with similar programs written in Haskell.

Cite

CITATION STYLE

APA

McNamara, B., & Smaragdakis, Y. (2004). Functional programming with the FC++ library. Journal of Functional Programming. Cambridge University Press. https://doi.org/10.1017/S0956796803004969

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free