Vaibhav Sagar gave a talk at ZuriHac Why Do Companies Stop Using Haskell?. If I’m honest, I found the talk a little difficult to follow, and I’m not sure if I understand any better why companies stop using Haskell or any other functional programming language.
It’s an interesting question, one point that Vaibhav makes during the talk is:
Many large projects fail, those written in Haskell may have their failure unfairly attributed to Haskell.
I have no evidence that this might be true but it somehow rings a little true to me. I’ve long been interested in the reasons that functional programming is not the norm. Part of my fascination with this topic is that functional programming languages (and in particular statically typed ones), feel much more productive to me. Now, there is some evidence that this feeling may be largely an illusion. However, that still doesn’t explain why more programmers are not falling under that illusion.
There is something of an analogy with taste here. There are certain foods which are near universally enjoyed, and indeed it seems strange to us when we encounter someone who, for example, doesn’t enjoy chocolate. There are certain foods though, which I enjoy, but nonetheless am not particularly surprised if anyone states that they do not enjoy them. Blue cheese is a good example, I really like the taste, but I note that it’s something of a polariser.
I find functional programming to be more like chocolate then blue cheese, in that I find it hard to really believe when someone claims that they don’t enjoy it. But in at least one other way it’s more like blue cheese. I am sure that there are some people who have tried blue cheese, and gave it a good honest try, they really wished to like it, but nevertheless didn’t. I’m also sure that there are some people who do not like the idea of blue cheese, and either never tried it, or wanted to dislike it from the start (you are afterall eating what amounts to mould). The point being that it’s easy to convince yourself to dislike something, before trying it, and that can heavily affect whether or not you actually do like it. I’m pretty sure I’ve been guilty of this when evaluating things such as Javascript. I’m just as certain there are people who have either dismissed functional programming before trying it, or wanted to dislike it when trying it.
Of course, it’s possible to be correct, even if you do not actually give something a fair go.
Still though, why do people in the first instance (assuming that they do) decide not to like functional programming before trying it? Whether or not they do that, why doesn’t everyone immediately see the same as I, that it’s just clearly a better way to program? As I said, there is mounting evidence (to me at least) that the choice of programming language is just not that decisive, why then does it feel to me as if functional programming is some kind of cheat code? And why is that view point not common?