Home Tech Inside the cult of the Haskell programmer

Inside the cult of the Haskell programmer

0 comment
Inside the cult of the Haskell programmer

At the same time, I understood almost immediately why Haskell was (and still is) considered a language more admired than used. Even one of its most basic concepts, that of “monad,” has spawned a cottage industry of explanations, analogies, and videos. One notoriously useless explanation, famous enough to be autocompleted by Google, says: “A monad is simply a monoid in the category of endofunctors.”

The language is also more despised than explored. Steve Yegge, a popular cantankerous blogger of yesteryear, once wrote a satirical publication about how the Haskell community had finally managed to find the only “programmer in the industry who gives a shit about Haskell.” For programmers like Yegge, Haskell is synonymous with a kind of overly intellectualized and impractical language with little applicability in industry.

What Yegge didn’t understand, however, is that using Haskell is rarely a pragmatic decision. It is an intellectual question, even aesthetic. In essence, Haskell has more in common with the films of Charlie Kaufman than with other programming languages: very cerebral, charmingly unconventional and strangely tasteful; appreciated by those in the know and judged by outsiders as pretentious. Haskell is, you could say, a cult classic.

That Haskell never Its widespread adoption exemplifies a paradoxical truth in software engineering: great programming languages ​​are not always good for programming.

Haskell is not inherently harder to learn than something like C, but the two languages ​​pose different challenges. Writing in C is similar to precision engineering and requires the kind of attention required of an expert watchmaker. But Haskell code is actually mathematical expressions in code form. C is the engineering language par excellence. Haskell is a pure mathematician.

The skills of a good engineer and a good mathematician do not always overlap. The industry’s not-so-well-kept secret is that most programmers aren’t as good at math or logic as you might think. In general, this is fine. After all, many doctors would be poor molecular biologists, few lawyers are legal philosophers, and the vast majority of MBAs know nothing about econometrics. But this means that few programmers can truly master Haskell. This includes me, of course, whose legs go weak at seeing expressions like “F-coalgebra” and “font class metaprogramming.”

Still, when I think about Haskell, a phrase about Martin Amis’s prose comes to mind: “the primacy he gives to style over matter.” Haskell programmers are style supremacists and it’s nothing to apologize for. In an industry often obsessed with utility and convenience, the Haskell community should not feel obligated to gather evidence of its usefulness. Instead, he should simply reply: What’s the problem with useless intellectual exercises?

Because the thing about useless exercises is that they don’t stay useless for long. Even when “industry programmers” rejected Haskell, language designers took note. In recent years, a Haskell-style paradigm has become fashionable because of the wealth of benefits it offers: making certain categories of errors impossible by design, making the correctness of a program more provable, and allowing easy parallel computation. Some of the most anticipated updates that appear in new versions of imperative languages ​​are those inspired by functional programming. In the end, Backus’s plea against von Neumann was heard. The programming has been released.

You may also like