3 ms·
It looks more concise but if you're like me not into functional programming much, .map() is magic. Consistency is more important than conciseness. Clear is bet
by Cthulhu_ 5y ago
It looks more concise but if you're like me not into functional programming much, .map() is magic.
Consistency is more important than conciseness. Clear is better than clever. Plus, a function invocation / .map() is heavier than an err != nil check / condition.
Don't get me wrong, I appreciate the Either pattern as an alternative to if err != nil, but I also appreciate the really dumb and straightforward approach of non-clever Go.