8 months of OCaml after 8 years of Haskell in production

The reasons that I think the culture will change fall into two broad categories. The first category is that the community that is actually doing the work wants change. The vast majority of the Haskellers who I spend serious time interacting with (specifically, online on various fora like this one, and on repo issues and discussions) who are making contributions to the ecosystem are either explicitly agitating for Haskell to become more suitable for industrial development, or at least in favour of it. Although there’s a lot of inertia, and reorienting Haskell will be like turning a battleship, I don’t see any opposing force trying to turn Haskell another way. People resist changes to the status quo. But that’s fine: there are well-understood approaches for dealing with that.

The second category is my personal experience. Three years ago I had to literally join the Haskell.org committee to get a PR to the website merged. That’s how hard it was to make changes to the community. Since then I’ve been successful in resolving some systemic problems, most of which are people problems, not technical problems, for example automating deployments to the website (the “people” part was ensuring the review process was streamlined), working diplomatically behind the scenes to build consensus that ghcup should be the single recommended install method, and advocating for stability, partly via the Stability Working Group. When I joined the CLC I was probably the most vocal proponent of the importance of stability. Then a year ago three new members joined who are arguably more vocal proponents than me! People who want cultural change are entering positions of influence.

So, things can change, people want them to change, they’re willing to work towards changing them, and I’ve already managed to changed a few things and learned how to do it. That’s why I believe the culture will change.

Granted, I don’t have as clear a view into all elements of the ecosystem as you. I don’t know everything you know about the systemic issues affecting getting from GHC/HLS/Cabal source code into deployed software that works well for users, so maybe I’ve overlooked something, but at this point I’m very optimistic.

16 Likes

How about your opinion on haskell’s life expectancy? I want to know for how long would it last, in terms of at least 0.5~1% portion of the ecosystem being in a usable state. In this perspective, would it last more than 5~10 years?
(Please, I asked hasufell’s opinion, who seems to be fairly objective and knowledgeable around these topics)

It’s been there for at least 25 years, programming languages take decades (if not more) to die. Haskell is so far the only language that I know which is lazy and pure it might be a small niche but a niche nevertheless (whatever arguments against than niche are). Until something better comes in that niche I don’t see how Haskell could die in the next few years.

2 Likes

Considering that it was you who started this thread:

https://discourse.haskell.org/t/i-feel-like-haskell-is-dying/4180

…it seems you’ve already decided, so why are you still here?

5 Likes

Sigh. I just returned recently to check out current status.

Well…and we are telling you to go check out OCaml :grinning_face_with_smiling_eyes:

Idk, honestly I don’t think even ocaml could stand for long-term, while it is going great atm. At this point, it seems more likely that python or similar languages would dominate entirety of programming as a universal language, while some C-like language supporting from below. Nothing else can persist for long.
Or, you know, AI might make the concept of programming languages obsolete; the practice of programming would still be alive, but that does not mean languages shall as well.

“Un quart d’heure avant sa mort, il etait encore en vie” , Jacque de la palisse.

(15mn before his death, he was still alive).

Until Haskell dies, anything can happen. Javascript was dead on delivery (1995) but survived long enough until Node came along (2009). Lua could have died from it, but it still there.
C# was supposed to kill C++, it hasn’t (C is still there as well etc…)

A breakthrough might happen (and I think it’ll come from cutting-edge features, not stability). Things like lens, servant or parallel computing are things were Haskell shines (obviously not enough).
It might be that the rise of AI make Haskell more accessible. After all if we end up programming by talking to a bot instead of typing thing ourselves , tooling and long error messages might matter less.

You can come back and ask the same question next year, and Haskell won’t be dead (and we won’t know neither until when it’ll be alive).

4 Likes

I don’t think you have to be so clinical about it.

The most important part of a startup (or any project) is actually writing the code. If I were to found a startup again, I’d probably go with Haskell. Because if I didn’t, I probably wouldn’t have as much fun coding. So I’ll build more faster and better writing Haskell than if I pick something like Rust or Go or Java or whatever.

Professional consumer software development has a lot of inherent grotesqueness. Haskell is a nice counterweight to the industry due to its design, culture, and values thankfully going against the grain. Especially if you lean into it and don’t end up with “mainstream software org chart that happens to write Haskell.”

Having fun is the real secret sauce to success imo. Or at least, that’s what I’ve been learning in my career so far.

6 Likes

Even if you didn’t write any code and would just do the hiring?

1 Like

If I were to found a startup again, I don’t see how I wouldn’t be doing actual engineering. Since it’s my core competency. Like, any startup I’d found would either be predicated on technical ideas I have and want to execute, and I’d be cofounding with someone more business-focused if necessary to round out the founding skillset.

The point being, there are definitely sorts of people who would found companies in Haskell. Not just because it’s an obviously efficient business decision.

1 Like

I can rephrase the question.

A friend of yours is starting a company and wants your advice on what technology to pick (let’s say something generic like an online shop). You don’t have interest or capacity to co-found or get involved other than doing some hiring for them. Would you make them pick Haskell?

1 Like

I mean of course not. I’d tell them to pick whatever the technical founder(s) feel most effective with and whatever vibes with the engineering culture they want.

1 Like

There is no technical founder. They have a product owner and want to hire a lead developer to carry out the tasks.

1 Like

I’d first tell them to get a technical cofounder if their company is a software company with technical problems to solve on its path to success :slight_smile:

2 Likes

Well, you’ve avoided the answer successfully, which to me means you’re not thinking of Haskell as a business solution, but as your personal preference to have fun in programming. Is that accurate?

1 Like

I didn’t avoid the question, I answered it.

You are either misunderstanding or trivializing the value of Fun in professional software development and startup success. I wasn’t being trite and telling people to mess around. I was giving insight into what I think results in successful, sustainable, long-lived software projects and companies that I’d want to spend my limited time contributing to.

All of my advice is business advice and comes from my own professional experience! Both a decade doing pure FP in production and a stint cofounding a startup for 3 years (with key parts of its stack built with Haskell and Elm). I am not being unserious in any way.

7 Likes

I want Haskell to be an inspiring language that embodies a vision, by taking a small number of unifying ideas, and see where they lead. Specifically:

  • Purely functional programming.
  • High-end static type systems

Now, that may not be everybody’s vision. Maybe the vision will die; maybe no one will use Haskell or OCaml, and maybe no one will care about functional programming. But I am much more optimistic than that. I think that purely-functional, statically-typed programming is just a better way to write programs, and
that has steadily become more and more apparent over the last four decades.

It is certainly possible that, rather than adopting Haskell or OCaml as-is, the mainstream world will simply absorb the ideas that they embody. Indeed, you can see Lisp/ML/Haskell/Ocaml fingerprints all over mainstream languages: garbage collection, lambdas, type classes, monads, generics, comprehensions, and so on. The ideas may not be as elegantly expressed, and in some cases may not even be feasible in practice (e.g. STM flourishes in Haskell but has been mostly abandoned by the mainstream); but they can still be extremely influential.

So what is the role of the Haskell community? I suggest

  • Stay true to the vision. Make Haskell elegant, expressive, and crucially (as others have said) fun.
  • Work hard to knock down obstacles to using Haskell in mission-critical applications.
  • Do all this in a collegial, diverse, open-source community, in which people trust each other.

See the Haskell Foundation vision.

These goals are enough for me personally. Maybe it will result in Haskell being more widely adopted; maybe not. But meanwhile it is a rich, rewarding, and intellectually challenging endeavour.

51 Likes

I wouldn’t but I wouldn’t recommend against either.
My main concern will be, not the language itself, but the recruitment (which depends largely on the physical location).

1 Like

Exactly. My answer to the question “should I use Haskell” is basically “if you hire me”.

  • hiring is hard
  • senior Haskellers are expensive
  • talented Haskell juniors will stay 1-2 years max in your company, before they transition to an employer you can’t compete with
  • many programming domains are underpresented in Haskell apart from generic backends, which means you might end up doing very heavy lifting of being a pioneer (this comes from painful experience of dealing with a custom event sourced Haskell backend)
  • many of the libraries you use will be abandoned half way into your project
  • onboarding new Haskellers is always challenging: people are into different corners of the language and what seems like an easy to understand codebase for some, is a nightmare for others
  • a Haskell codebase that has survived a couple of generations of different Haskellers can look like an odd giant… because there are so many ways to do the same thing
  • the tooling can easily become a bottleneck… compile times, HLS crashing, expensive GHC upgrades, …

And yet… it’s fun, at times.

So… “should I use Haskell?”. Well, “no”, unless you know what you’re getting into or you’re an invested enthusiasts.

But… I think that perception should change too. I’d like to recommend Haskell even to people who are not FP enthusiasts and say: “Yes, use Haskell, because the libraries are excellent, the tooling is smooth, the compiler is reliable and fast, hiring is easy and there’s lots of great documentation and advanced guides on how to evolve and structure your projects”.

That is a different kind of fun… it’s the fun that comes with smooth, pleasant user-experience and less with an expressive, elegant language.

We’ve managed the latter through those excellent researches like @simonpj, pioneering language research. But I think there’s a long way to go to make Haskell fun in those more boring ways.

So no, I don’t think I’m trivializing fun in software development.

12 Likes