A big concern for me is generic methods on containers, which the draft explicitly mentions will not be supported. One of the benefits of generics (IMO) would be ([]int).Filter, ([]string).Reduce, etc. (See my attempt at this: https://github.com/lukechampine/ply …)
I'm highly, highly skeptical that adding generics to Go will be a Good Thing. But if there's anyone I trust to get generics right, it's the Go team.https://twitter.com/golang/status/1034471897948454912 …
-
-
Show this thread
-
Another interesting consequence is that the stdlib will probably add a new package for all the common generic container operations. (Otherwise, everyone will end up importing some 3rd-party package, a la underscore.js.) Very curious to see what that API will look like.
Show this thread
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
We just announced an update for Go 2!
This includes preliminary draft designs for generics, error handling, and error values.
Read our blog and watch the video by