News for hackers. Stuff that matters.
Re:My Go Resolutions for 2017 by jimbokun on Wednesday January 18, 2017 @04:02PM (#13430249)
"I don’t believe the Go team has ever said “Go does not need generics.” "

I think that's true, but I do think its been said by a number of Go users and advocates, which is where the perception comes from.

Re:My Go Resolutions for 2017 by kasey_junk on Wednesday January 18, 2017 @06:08PM (#13431346)
Meanwhile I've said "even if they don't introduce user defined generics it would be nice if they fixed the language defined ones"

The builtin generics are a mess. At this point I don't trust the go team to implement any more complicated generic system.

Re:My Go Resolutions for 2017 by tomjakubowski on Thursday January 19, 2017 @01:09AM (#13433482)
> The builtin generics are a mess.

Could you elaborate on this? I must not have used arrays, slices, maps, or channels enough to find that there's some common issue with all of them, other than that the user can't write her own functions generic over them.

Re:My Go Resolutions for 2017 by kasey_junk on Thursday January 19, 2017 @12:34PM (#13437553)
The most obvious problem is that variance doesn't work.

You cannot pass a []string to something that expects a []interface{} for instance, even though you can put every item in the first in an instance of the second.