There was an interesting article that was written by Guillaume Marceau recently about visually expressing the usefulness of programming languages. The article uses star-line plots to show how different programming languages compare with one another in speed and expressiveness, as each is used to solve a number of common problems. It’s always nice to check your gut reaction to different programming languages against empirical evidence. Language choice can be as varied as our food preferences, often not based solely on fact. Like our palate, we may find that our preference for our favorite programming languages change over time. As we learn more and use our language of choice to solve real problems, the initial love affair may turn into a nightmare.
In the programming language visualization article, Marceau concludes that there are many functional programming languages that are very fast, compared to C and C++. He also notes that the primary factor that determines the speed of a language is it’s maturity — the number of years that it has been around. In general, one of the primary benefits of functional programming languages is that they provide closure-based programming, lock-less data structures, and eschew saving state that result in a high degree of automatic parallelization and processing throughput for problems that can be easily defined in functional terms. In theory, and sometimes in practice, functional programming is great for quickly processing large swaths of data (speed) or cleverly solving an algorithmic problem with very compact code (expressiveness).