News for hackers. Stuff that matters.
Re:Eight years of Go by AnIdiotOnTheNet on Friday November 10, 2017 @02:24PM (#15672240)
From this description, I'm getting the impression that Go's interfaces are not as much like Java interfaces as I had assumed.

Never the less, I find that generics usually are just an over-engineered solution to any given problem.

Re:Eight years of Go by weberc2 on Friday November 10, 2017 @05:12PM (#15673500)
The primary differences (I think) are that everything in Java is already a pointer, so there isn't an extra alloc to make an interface. The same is true in Go if your comparables are all pointers. Probably the more significant difference is that Java has a JIT compiler, which may be able to inline all of those calls to Compare(). This is largely why Go's `sort` package abstracts over the collection, not over the element.