Hacker News new | ask | show | jobs
by Veraticus 1073 days ago
Uh, generics are not data structures and generics are neither the only way nor the best way to interact with data structures.
2 comments

Do you think it is somehow more elegant to have a specialised version of a data-structure for every single type that may need to be placed into it? Or just to ignore the type whatsoever and erase it via interface{}? Even Golang's designers obviously realise that generics are a better way to interact with data structures because the standard types map and array were always "generic", just special cased as such.
Yeah, you must hate use the golang map type then. It is a generic data-structure.