[Haskell-cafe] Why Haskell?

jack at jackkelly.name jack at jackkelly.name
Mon Mar 29 00:48:12 UTC 2021

March 29, 2021 10:24 AM, "Clinton Mead" <clintonmead at gmail.com> wrote:

> I’m looking for recommendations of videos/articles to show to a software development manager about
> why one should use Haskell, focused more from a benefits to business perspective.

This article is about Elm, but should generalise to other strongly and statically-typed ML-family functional programming languages: http://nonullpointers.com/posts/2019-05-28-side-effects-of-elm-in-production.html

(Disclosure: I work for Bellroy, but didn't when the events in this article took place. We are now using Haskell for a small but growing number of backend services.)

Key points:

* The react build of the checkout took six months and had data loss and error reproduction issues
* The react build caused an 8% drop in conversion rate, and nobody could work out why
* Some state transitions were missed due to weak typing in redux
* The Elm rewrite took three months (1/2 the time, though consider that the devs would have a good handle on the domain at that point)
* The Elm version was ~55% the SLOC of the react version
* The Elm version had essentially no runtime failures
* The Elm version forced the developers to consider all state transitions
* The Elm version was much easier to modify, which meant experiments were cheaper to build and run

Note: A checkout page seems to be a particularly good fit for Elm because it has a lot of complicated state transitions (so you get a good payoff from adopting types), "getting it wrong" has a large cost (directly translates into missed conversions), and doesn't need to interact with external JS libraries _that_ much (payment SDKs notwithstanding, but that tends to happen at the end of the checkout process).


-- Jack

More information about the Haskell-Cafe mailing list