Re:Dhall: A Gateway Drug to Haskell
by ParetoOptimal on Wednesday June 08, 2022 @03:12AM
(#31664280)
> Haskell-like languages where there are a few standard meta-abstractions like Monad/Applicative/Functor make it an order of magnitude easier to pick up a new framework, because they mean core abstractions work the same in every framework.
Exactly! The abstractions are less leaky, more sound, and give this gift and feeling of universality, unrivaled composition, and cohesion.
20 years ago you would've been saying C++. Rust is closer to the Haskell of 20 years ago than it is to most languages of 20 years ago. Hell, one could make a decent argument that Java 17 is closer to the Haskell of 20 years ago than it is to the Java of 20 years ago. Even Python is feeling the need to add types (and increasingly more people are using TypeScript rather than vanilla JavaScript), even Go is feeling the need to add generics...
> In particular the common abstractions (Monad, Applicative, Functor) are used very differently in different libraries (everyone seems to want to write her own DSL), so it's hard to get comfortable with third party libraries.
This is completely backwards IME. In most languages, every new framework comes with its own abstractions that you have to learn (whether that's, IDK, Spring Beans, ActiveRecord, React Hooks, ...). Haskell-like languages where there are a few standard meta-abstractions like Monad/Applicative/Functor make it an order of magnitude easier to pick up a new framework, because they mean core abstractions work the same in every framework.
All that said, I do kind of agree with your conclusions, but I think that's more about the industry being dishonest about its priorities. IME Haskell really does deliver what it says: for less than twice the effort of something like Python, you can write software that approximately never has bugs, in the sense that it will always do what it was specified to do. But most of the industry doesn't actually care about getting rid of bugs; they'd rather have buggier software in less development time (and if that means more maintenance effort in the long term, well, who cares).