News for hackers. Stuff that matters.
Re:Another go at Go failed by poorelise on Wednesday January 08, 2014 @08:08AM (#7023218)
I think in many cases you don't need generics because you can use the interface mechanism instead. The way Go does it is a bit confusing at first, so I suspect many Go newcomers don't really understand they could have used it.

As an example look into the way sorting is implemented in the standard library: http://golang.org/pkg/sort/

I had to look at this example for a long time to get it... And now I have forgotten it again since it was months ago :-(

I still thought it requires too many lines to sort stuff, but it is doable.

Re:Another go at Go failed by frou_dh on Wednesday January 08, 2014 @08:22AM (#7023279)
That's effectively subtype polymorphism, while generics are parametric polymorphism. Many languages (including Java) make use of both.