Re:Should Go 2.0 support generics?
by hdhzy on Saturday July 22, 2017 @03:33PM
(#14828926)
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?
[ Parent
| on HN ]
Where do you see interface{} getting sprinkled?
Any libraries or anything in particular?
Re:Should Go 2.0 support generics?
by concede_pluto on Saturday July 22, 2017 @10:08PM
(#14830551)
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.