4 ms·
Please throw this Java mentality away. Code duplication isn't an issue, code maintenance is. While lack of duplication might help, it is in no way a necessity f
by mavdi 13y ago
Please throw this Java mentality away. Code duplication isn't an issue, code maintenance is. While lack of duplication might help, it is in no way a necessity for a maintainable code base.
- iopq 13y agoIf code is duplicate of some other code maintenance increases 2x. If it's in ten places, it's 10x. If two different version diverge and they should really be the same (but for some reason one has data packed into an array and the other has multiple arguments, etc.) it becomes impossible to fix it without breaking something
- coldtea 13y ago>Please throw this Java mentality away. Code duplication isn't an issue, code maintenance is. Actually what you describe is the Java mentality exactly! That's why Java is full of code duplication and is supposed to help with code maintenance.
- gbin 13y ago... until you find a bug duplicated x times in all your versions and you missed one of the x different unit tests to test them all ? IMHO when you are fighting your language to avoid code duplication, you either use it incorrectly or something is wrong about the language. To be honest, I only encounter rare cases where, dammit I would really love generics. And the Go team never said no to it, they just have more urgent stuff to do first. [Disclaimer: Googler here using Go, yaddi yadda, this is just my opinion]