3 ms·
> Even without do-notation the Haskell is considerably shorter This is a great example, not to your point, but to the methodology of Go. You give a verbose Go
by retzkek 7y ago
> Even without do-notation the Haskell is considerably shorter
This is a great example, not to your point, but to the methodology of Go. You give a verbose Go example, that I expect the vast majority of readers here could understand, even if they've never written a single line of Go, followed by a terse but syntax-heavy Haskell example that I expect relatively few could.
- erik_seaberg 7y agoThe Go version is 78% useless noise trying to hide f(computeFirst(), computeSecond()) which is what a maintainer needs to focus on. We know everything can fail, we don't need to be incessantly reminded of that. If completely inexperienced people can read idiomatic code, that means the idioms don't capture anything tricky that had to be learned the hard way. There's no payoff for getting better with the language.
- int_19h 7y agoThe last example is Haskell without the syntactic sugar. The first example is in Haskell how it's normally written, and it's far clearer than Go.