Re:Warming up to Go
by lmm on Saturday September 12, 2015 @01:19PM
(#10208621)
That's the right approach, but it's still decades behind what a decent programming language would give you for free. You have to copy-paste that "errWriter" definition for every possibly-error-raising method that you want to call, because go has no generics. If you want to write to two different writers, let alone a list of them, then you have to go back to the function-and-variable version, which is very boilerplatey and impossible to reason about when refactoring.
[ Parent
| on HN ]
There are no comments on this comment yet.