Hacker News new | ask | show | jobs
by bsder 4131 days ago
Congratulations. Welcome to why you don't use Go.

Lack of generic access to data structures is one of their bigger fails.

However, they don't see it that way. One point of Go was to prevent needing to describe things before being able to compile it. Most things that people regard as "failures" in Go were deliberate choices to enable large codebases.

1 comments

No, that's not why you don't use go. What the parent comment is dealing with is the fact that you can't have maps keyed by a net.IP, which is implemented as a []byte. Byte slices are not valid keys. This isn't really about generics.
It is very much about polymorphism and generics.