News for hackers. Stuff that matters.
Re:Toward Go 1.3 by riffraff on Tuesday February 11, 2014 @04:28PM (#7220582)
I am not sure I understand why you need generics for this, doesn't C get by passing a single function pointer?

Could you explain why Go needs an interface with 3 methods?

Re:Toward Go 1.3 by pcwalton on Tuesday February 11, 2014 @04:51PM (#7220736)
Type safety, and the lack of fields in interfaces. In C you have to pass the size of the elements to quicksort, but in Go you can't do that without using the unsafe module. So you need a virtual Swap() method. And because Go needs to take a single interface, and interfaces in Go can't have fields, you need a Len() method as well.
Re:Toward Go 1.3 by riffraff on Tuesday February 11, 2014 @06:52PM (#7221490)
thanks I think I understand now.