News for hackers. Stuff that matters.
Re:Generics aren't ready for Go by j16sdiz on Monday February 18, 2019 @09:34AM (#19190791)
You use an interface.

Golang use duck typing. It is very flexible and very simple. (Some times too simple)

Re:Generics aren't ready for Go by kuschku on Monday February 18, 2019 @09:38AM (#19190823)
So how do I make e.g. a TreeSet of something, put my elements in, and get them back out as the same type, without casting?