Re:Generics aren't ready for Go
by Svip on Monday February 18, 2019 @09:27AM
(#19190745)
You generally try to design your list so it contains types with common methods by using an interface (not the any type interface{}, mind). You could have a list (slice or map) of io.Writer, where it can contain any type that implements Write([]byte) on itself.
[ Parent
| on HN ]
There are no comments on this comment yet.