Can a Programming Language Make You Smarter?

Or can a language change the way you program? In an article in the Huffington Post, Aaron Contorer says it can. The language? Haskell. (Note: Contorer is the CEO of a company that provides Haskell tools and a Haskell IDE on a subscription basis.)

Haskell was named after Haskell Brooks Curry, an American logician primarily known for his work on combinatory logic. He seems to have been quite influential in the programming community: Brooks and Curry are also programming languages named after him, perhaps not surprisingly—combinatory logic is considered to be one basis for functional programming languages. It would be interesting, though, to know if he holds the “most programming languages named after” record.

What is a functional language? An explanation is far beyond my mathematical ability, but one quality of functional languages is that they don’t look kindly on the assignment of changeable variables. As Miran Lipovaca says in his charming book about learning Haskell, Learn You a Haskell for Great Good, “You … can’t set a variable to something and then set it to something else later. If you say that a is 5, you can’t say it’s something else later because you just said it was 5. What are you, some kind of liar?

Haskell was developed beginning in the 1980s by a committee with a particular interest in lazy evaluation, an evaluation strategy in which an expression isn’t evaluated until it’s needed. For the Haskell community, laziness is one of the most important attributes of the language. Says Simon Peyton-Jones, one of Haskell’s developers, “We were much more consistent about keeping the language pure. You could have a pure, strict, call by value language, but no one has managed to do that because the moment you have a strict call by value language, the temptation to add impurities (side effects) is overwhelming. So ‘laziness kept us pure’ is the slogan!”

Peyton-Jones also addresses a common criticism of the language—many people seem to find it hard to learn. Most C++ programmers, he says, are going to have to go through a major mental rewiring to learn Haskell. “If you’re to be a purely functional programming language, you have to put up with that pain.”

So is it worth the pain? Contorer’s Huffington article links to an interesting survey that indicates that Haskell was the favorite among surveyed programmers, and the language about which programmers were mostly likely to say “learning this language significantly changed how I use other languages” and “learning this language improved my ability as a programmer.” Another survey on Hammer Principle ranks Haskell #1 among languages “likely to have a strong influence on future languages.” But there isn’t universal agreement about the value of Haskell in today’s software landscape.

The online magazine Help Kids Code has a clear explanation of the attributes of Haskell. This article is an interesting description of using Haskell to produce a Fashion Week layout for the New York Times.

Personally, I find the idea of learning a programming language from a book entitled Learn You a Haskell for Great Good pretty irresistible. There are lots of other online resources. Haskell can be downloaded free from Haskell.org, which has loads of good material, such as links to local user groups. FPComplete includes many tools, tutorials, and an IDE.

I’m hoping that learning Haskell will give me at least some idea what combinatory logic is, and, yes, that will certainly make me feel smarter!

About the Author

Lani Carroll is a writer living in Colorado Springs. She loves Colorado microbrews, TCM, and those rare moments when she can find the perfect word without resorting to a thesaurus. She’s the only freelance writer east of the Rockies who doesn’t have a blog. She does, however, have chickens. She can be found at her Google+ Profile.