Why (some) Python programmers don't want Haskell

4 minute read Published: 2023-07-16

A Haskell discourse thread asks why more Python developers couldn't instead be using Haskell.

One of the points made in this thread, is that there is a sizeable class of Python programmers for which the trope "Python programmers will be scared of monads!" doesn't apply. I thought I would ask some of the people I know that use Python why they don't use Haskell.

Some notes about the demographic:

These opinions are not my own.

General themes:

Subject A

I know nothing about Haskell despite it being in my list of things to look at for ages 😅😅😅 But I think part of the answer is the same as "why do you use this messaging app instead of that one": it's what the community uses.

network effect?

I think it's a big part. Another could be inertia : "I'm in research/industry and I have a new project. I'm not going to change my workflow just for shits and giggles". So if a working professional has been using python, it's unlikely to change if they keep working in the same field. I think.

But I'll tell you that : I think imperative is easier then functional, and I think many people agree. And the fact that if you want, you can do a bit of functional un python just sweetens the pot.

Are you aware that you can program imperatively in Haskell?

No, I wasn't aware.

Subject B

I’m not a huge programmer but when I need to program something, I will most likely use python by default. The reasons:

  • it takes me 5 mins to have an environment working in Python and I can focus on programming. It would take me days to make it work in Haskell. I guess the reason is I’ve never worked on a small project without fancy features from scratch in Haskell.
  • I find functional languages hard to read. If I see a python program, in a few minutes I know what’s roughly the purpose, with functional languages I cannot (not just Haskell, but Scala too).

Maybe I am biased in the sense that I’ve seen a lot of simple Python programs written by non-specialists, but only complex projects made by professionals in Haskell/Scala. Basically: I need newbies to write more Haskell programs

Subject C

  • Everything just works: Installation, setting things up, getting general support.
  • there's a library to do pretty much anything and a million people who have solutions for any one of your questions Numpy, scipy, pandas, geopandas, any tool API, ...

Everything is available in Python. I can teach any student to write python in 15 minutes. With Haskell/Scala/... it will take me days to get there and most likely I'll encounter an issue where I'll need something that's not available or very inconvenient

Every programmer understands OO, I'd say < 30% understand functional to a level where they can be proficient.

In pretty much every (university) course I am aware of, people will learn procedural programming with OO as a next step. Functional, logic oriented, etc. are seen as special cases that are taught "on demand". I'm aware that functional is now trending for web dev, but usually you get into it after learning the imperative styles.

This also includes tutorials. There are lots of "intermediate level" people doing YouTube tutorials of certain intermediate level Python things. (Function references, generators, lambda expressions, decorators)

I'm yet to find any good video explaining currying or monads aimed at intermediate level programmers. It's either "follow these steps exactly" without proper explanation, or some deep dive stuff explaining the ins and outs using all the "big words".