Fork me on GitHub

@borkdude fascinating piece about Haskell! It reflects how I feel any time I try to build anything more than Hello World with it:grinning:


@seancorfield Can you explain what exactly you feel/think/experience?


Are you responding to the post Eric wrote?


@borkdude I was one of the PhD researchers developing his own FP language back in the early 80's -- many British universities were doing that. When Haskell appeared, as a collection of "best of breed" features from all our languages, I was very excited and really thought Haskell would break out and take FP mainstream. It combined a lot of ideas that everyone had been working on and it was just so obviously the "right way" to build software. Of course, it stayed resolutely academic. So, over the 25 years it's been around, I've taken several runs at building something with it, something useful, non-academic, something real-world. Every time I've gotten incredibly frustrated with the state of tooling, libraries, the difficulty of doing certain basic thing (as the slide deck indicates, doing anything non-trivial with databases is still pretty painful in Haskell, as one example).


The academics never cared much about a good ecosystem, of course, and the non-academic portion of the community has often gotten too frustrated to overcome that inertia -- and given that absolutely everything has to be built from scratch in Haskell it's a huge amount of work trying to replicate what's available in other communities.


As Saurab said in that preso, they'd find half-baked / abandoned libraries -- or a complete lack of a solution -- and often build their own.


And this is after a lot of commercial usage of Haskell has really improved the ecosystem and made it much more practical for writing real-world applications.


Kris Jenkins (yesql author) mostly moved to Haskell. I asked him if he missed something from the JVM ecosystem. He said no. I wonder what kind of apps he builds.


Depending on the goal you dont need a large ecosystem. Haskell excels at some tasks sucks at others, same is true for clojure or any other language


@mpenet Yes, that's very true. And when I've talked to Haskell folks working in specific areas, they've usually settled on a set of libraries and tools that work for them but, when pushed, will admit to rough edges or omissions that they've just had to deal with and then that's their new "normal".


Logging and instrumentation (e.g., New Relic) are things we take for granted on the JVM but they are hard in Haskell (because they are impure actions that apply across "all" aspects of your applications. Companies seem to either write their own or simply not do those things (sometimes with elaborate justifications of why Haskell "doesn't need" those things -- which feels like Stockholm Syndrome to me!).


Interesting critique of SBT (informally known as Scala’s Build Tool):


Does anyone actually love SBT?


Martin Odersky wrote an elaborate critique on SBT six years ago (see comments) but nothing got fixed


@seancorfield logging and instrumentation is useless in some domains


There's more than the vanillia app/service out there


For general purpose tasks the jvm makes it easy for sure


@mpenet Right, but using Haskell for web apps -- which was the context of that slide deck -- means that logging and instrumentation are important and Haskell makes those very hard.


Sure that s my point, moving from rails to haskell for this is a mistake imho


There are better choices


Hell, even scala would fit better ;)


They could’ve also gone for JRuby if they needed something JVM specific


But their needs were “refactoring confidently”, which doesn’t solve that


Seems they were after code safety etc


So yeah, prolly scala or even java/kotlin would fit the bill


Their slide of Ruby code shows something that doesn’t necessarily have to do with static typing though. More with functional vs. RoR mutable magic


However, their JavaScript mentions: “what’s the shape of this JSON”, not much different from Clojure


Yup no need to go full monads for that either, even go lang has this covered. Clojure with some spec could prolly do the same too


How does go lang solve that?


You declare structs with tags for json mapping


It s somewhat composable via embedding too


similar to Java + annotations I guess?


Slightly more elegant imho, it s simpler


type Response2 struct {
    Page   int      `json:"page"`
    Fruits []string `json:"fruits"`