News for hackers. Stuff that matters.
Re:Why Go is elegant and makes my code elegant by sdegutis on Wednesday April 09, 2014 @06:06PM (#7562792)
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.
Re:Why Go is elegant and makes my code elegant by AnimalMuppet on Wednesday April 09, 2014 @06:41PM (#7563000)
That'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.

Re:Why Go is elegant and makes my code elegant by copergi on Wednesday April 09, 2014 @08:35PM (#7563507)
>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.

Re:Why Go is elegant and makes my code elegant by mavdi on Wednesday April 09, 2014 @06:45PM (#7563031)
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.
Re:Why Go is elegant and makes my code elegant by gbin on Wednesday April 09, 2014 @07:29PM (#7563238)
... 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]

Re:Why Go is elegant and makes my code elegant by iopq on Wednesday April 09, 2014 @07:20PM (#7563194)
If 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
Re:Why Go is elegant and makes my code elegant by coldtea on Wednesday April 09, 2014 @07:29PM (#7563236)
>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.