12 ms·
One of the main jobs of a programming language is to reduce the amount of duplication you have to write. It just seems to me like being okay with that is antith
by sdegutis 13y ago
One of the main jobs of a programming language is to reduce the amount of duplication you have to write. It just seems to me like being okay with that is antithetical to progress in practical language development.
- AnimalMuppet 13y agoThat's not what Go thinks its job is at all. Go thinks its job is to make it easier to write and maintain large scale software applications. Removing the amount of duplication that any one developer has to write is not one of the design criteria. If you're not running into the issues that Go is trying to solve, you don't understand why its solutions are at least somewhat interesting, nor why its trade-offs are reasonable.
- copergi 13y ago>Go thinks its job is to make it easier to write and maintain large scale software applications It thinks wrong. Making people duplicate code makes it harder to write and maintain large scale software applications.
- mavdi 13y agoPlease 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]