|
|
|
|
|
by grey-area
2869 days ago
|
|
A little duplication is better than the wrong abstraction, and I've seen far more subtly wrong or obfuscating abstractions than duplication in code I have to manage. Go is definitely not perfect, and sometimes it's plain wrong about this (I don't particularly like the go error handling and hope it improves), but there is a reason for discouraging certain types of abstraction and encouraging verbosity and boring code instead, and it's not to save the compiler time. https://www.sandimetz.com/blog/2016/1/20/the-wrong-abstracti... |
|