Why don’t people use functional languages more.

“There are only two kinds of languages: the ones people complain about and the ones nobody uses” — common quote

This is a fun statement if you think about it. Because the languages everyone complains about are obviously better than the ones nobody uses. It seems controversial but a simple thought example shows why it has to be this way.

Imagine a world where the mainstream languages were worse than the niche languages like Haskell or Crystal. In this world Haskell has a clear 2x productivity advantage over Java. Since Haskell is clearly better than Java most projects that use Haskell will execute roughly twice as fast. Double productivity is enough that companies using Haskell will be able to achieve the same results with less money spent on developers and thus achieve higher profits. We should see companies that don’t use Haskell going out of business. Eventually we would expect all greenfield development to happen in Haskell. 

You might say well, “Haskell isn’t really twice as good as Java, it is only 20% more productive overall”. Well, 20% averaged out over hundreds of thousands of software engineers is a huge amount of money. My employer would very happily take a 20% increase in productivity if it were on the table. 

However, in the real world we don’t see all greenfield development happening in Haskell. Instead lots of greenfield development happens in Java, Javascript or the .Net ecosystem. 

There has never been a consensus moment in the industry around niche functional languages. Instead people say they wish they could use them while making actual money writing Java code. 

Personally, I would really like to use a better language than Java. Unfortunately, we don’t seem to live in that world.