4 ms·
Except for the pyramid of doom (which you can avoid with good architecture) this reads more like "why to use go over haskell" (at least for me as someone famili
by domano 6y ago
Except for the pyramid of doom (which you can avoid with good architecture) this reads more like "why to use go over haskell" (at least for me as someone familiar with go).
I started writing go at the same time i started to work on production with it. In 2 weeks time i had a working service and learned the language, instead of the setup.
Interestingly enough the main problem was the pyramid of doom though (due to various http middlewares)!
Nowadays i don't have issues with the pyramid of doom.
Still it seems that in the long run the benefits are similiar, except for the time it took to build it, so if it was fun i think it was worth it.
- lallysingh 6y agoI use both and am much happier and much, much more productive in Haskell. What they don't cover here are any of the benefits of the language. The abstractions of the language provide an excellent toolkit to express the intent of your code succinctly. That makes it easy to reason about, cheap to maintain, and fast to develop. Go gets you started quickly, but your code will be no more expressive after 5 years of development than at 5 weeks.
- domano 6y agoI would have thought that a change in expressiveness leads to less maintainability, not more. Could you elaborate on that point?
- lallysingh 6y agoNo, the more expressive the language, the more directly you can have the code model the intent within the domain. As the reader sees the intent and function of the code clearly, they can understand and reason about it better. As an example, Either-monadic code automates an error check on every line, immediately returning on the first error. The go equivalent is a ton of mind-numbing "if err != nil" checks between every relevant line of code. The go equivalent is mostly mechanical clutter. But all those LOC still add maintenance. People have to read and check them (no wrong operators, no references to the wrong variables, etc).