News for hackers. Stuff that matters.
Re:Maybe adding generics to Go is about syntax after all by dagss on Tuesday September 04, 2018 @10:57AM (#17909481)
Go has a lot of pain points but the one positive thing it has over other languages is how it handles interfaces.

The whole point is that the caller can make new interfaces to fit existing structs in other libraries.

Re:Maybe adding generics to Go is about syntax after all by jonathankoren on Tuesday September 04, 2018 @12:13PM (#17910088)
Actually, two of the pain points of Go is not knowing exactly what interfaces a class implements, and finding out that you misimplemented an interface but not discover this static analysis until you get a runtime type check failure.

All this pain for what boils down to not having to make a wrapper. Sure wrappers are dumb, but pushing a static analysis out to a run time error dumber, especially since implementing interfaces is a lot more common than wrapping 3rd party structs.

Re:Maybe adding generics to Go is about syntax after all by pjmlp on Tuesday September 04, 2018 @11:43AM (#17909810)
Nothing new, ML derived languages also allow for it.
Re:Maybe adding generics to Go is about syntax after all by k__ on Tuesday September 04, 2018 @11:59AM (#17909964)
TypeScript too.
Re:Maybe adding generics to Go is about syntax after all by stouset on Tuesday September 04, 2018 @05:10PM (#17912834)
Implicit implementation of interfaces is a disjoint concept from allowing third-party users to implement new interfaces on first-party or second-party structs.

The latter is wonderful, and other languages support this without needing to resort to the former.