Feeds:
Posts
Comments

Archive for December 21st, 2008

Here’s a nice intro to functional programming on Dr. Dobbs.

In any functional programming language, you are likely to encounter these features:

* First-class functions, or higher-order functions: Functions can serve as arguments and results of functions.
* Recursion as the primary tool for iteration.
* Heavy use of pattern matching, although technically it is not a defining feature of FP.
* Lazy evaluation, which makes possible the creation of infinite sequences and other data structures.

At the end of the article on page 2 you get a nice discussion of Mathematica as a functional programming language.

It’s been noted a lot lately in technical publications that functional programming will continue to grow in importance due in large part to the need for parallel computing.  Functional programming is well suited for massive parrallel computation for a variety of reasons and the article does a good job highlighting some of those.  Of course, it comes at a price to developers – the learning curve.

It’s not a trivial exercise to switch from OO and imperative styles into functional.  And the lack of huge repositories of free code makes doing a quick commercial application fairly challenging.

Read Full Post »