Saturday, February 19, 2011

The Dirty Truth about Functional Programming

The advice that I typical given young'ins in computing is this: "learn functional programming and solve some interesting problems with it; it will make you better". I'm serious when I tell people to learn LISP, OCaml, and Haskell. These are the most beautiful languages we have.

Mastery of FP makes you a better programmer and enables you to solve sophisticated problems fast. This is the crux of why they are not wide-spread.

Take two very talented programmers named John and Steve. Both are equal in every regard. Give them a difficult problem to solve. Both of them, being smart, solve it. Great, we have two solutions.

The solutions are going to be incompatible at some level. Each programmer has defined their own reality (which is very easy in a FP) and made their own language to solve it in a concise and precise way. But the realities clash and are ugly and obtuse to each other. In John's reality, the flowers are purple. In Steve's reality, the flowers are red. More importantly, John doesn't want to live in Steve's reality and Steve doesn't want to live in John's reality.

Fundamentally, FPs (which are reserved for smart and clever people) do not scale out in the business setting. The people smart enough to use FPs are tragically cursed to this reality as smart people tend to be like cats and are difficult to herd together.

No comments:

Post a Comment