I'm not a huge fan of Go, and I tend to prefer the more mathy languages like Haskell, but even as someone who has done a lot of professional functional programming (multiple years of Haskell, F#, Scala, and Clojure), and even more years of doing it as a hobbyist, it's really hard for me to recommend using Haskell over Go for anyone who isn't a math geek like me.
Go is generally a "good enough" language. The syntax is familiar to people using C, it has nice concurrency support, it's generally pretty fast, it's got a nice GC [1], it has structured typing that is a bit more flexible than the nominal stuff you get in Java, and it has a decent library ecosystem.
Haskell is kind of a cool language but its library ecosystem is crap, there really aren't any good idioms for doing stuff, everything is hidden by a million arcane compiler extensions, getting anything even remotely usable for engineering requires liberal use of lenses and thus generated macro stuff, performance is harder to predict due to laziness, and a lot of the concepts are kind of hard to grok. Stack made things a bit less horrible by more or less figuring out ways to lock in versions of dependencies, but that doesn't really change the fact that the libraries themselves are often crap.
Go might not be a "good" language, but unlike Haskell it's a productive language. It's relatively straightforward to get something that more or less works. I'm not sure I can say the same about Haskell, and I also don't completely buy the argument of "It's harder to get it working in Haskell, but once it works it stays working".
[1] I know there's some controversy on that particular point, but I think the sub-millisecond pause times are pretty neat.
8 comments
[ 1.6 ms ] story [ 36.6 ms ] threadHow old is this?
I can't tell if this is written before or after Go introduced generics, or if any of the other issues raised have been fixed by later releases.
That's why it doesn't mention Go's generics which landed in 2022.
I'm not a huge fan of Go, and I tend to prefer the more mathy languages like Haskell, but even as someone who has done a lot of professional functional programming (multiple years of Haskell, F#, Scala, and Clojure), and even more years of doing it as a hobbyist, it's really hard for me to recommend using Haskell over Go for anyone who isn't a math geek like me.
Go is generally a "good enough" language. The syntax is familiar to people using C, it has nice concurrency support, it's generally pretty fast, it's got a nice GC [1], it has structured typing that is a bit more flexible than the nominal stuff you get in Java, and it has a decent library ecosystem.
Haskell is kind of a cool language but its library ecosystem is crap, there really aren't any good idioms for doing stuff, everything is hidden by a million arcane compiler extensions, getting anything even remotely usable for engineering requires liberal use of lenses and thus generated macro stuff, performance is harder to predict due to laziness, and a lot of the concepts are kind of hard to grok. Stack made things a bit less horrible by more or less figuring out ways to lock in versions of dependencies, but that doesn't really change the fact that the libraries themselves are often crap.
Go might not be a "good" language, but unlike Haskell it's a productive language. It's relatively straightforward to get something that more or less works. I'm not sure I can say the same about Haskell, and I also don't completely buy the argument of "It's harder to get it working in Haskell, but once it works it stays working".
[1] I know there's some controversy on that particular point, but I think the sub-millisecond pause times are pretty neat.
If you want a language to feel clever instead, Haskell is always there.