4 ms·
It's interesting that it's 2017 and this question still gets asked. Go having static types but no generics is the worst of two worlds: both dynamic languages an
by hdhzy 9y ago
It's interesting that it's 2017 and this question still gets asked. Go having static types but no generics is the worst of two worlds: both dynamic languages and compiled languages with genetics have basic functional constructs like map/reduce but Go insists on sprinkling interface {} everywhere and calls this "solution" good enough?
- hactually 9y agoWhere do you see interface{} getting sprinkled? Any libraries or anything in particular?
- concede_pluto 9y agohttps://godoc.org/golang.org/x/sync/syncmap https://godoc.org/golang.org/x/sync/syncmap leaps to mind as a type whose users should demand and get static type safety, but it can't happen until the language definition adds yet another special case blessing it as a properly supported collection type.