2 ms·
Comment on the issue: https://github.com/golang/go/issues/43651#issuecomment-758867068 https://github.com/golang/go/issues/43651#issuecomment-75886... From the
by nixpulvis 6y ago
Comment on the issue: https://github.com/golang/go/issues/43651#issuecomment-758867068 https://github.com/golang/go/issues/43651#issuecomment-75886...
From the proposal:
> However, it‘s tedious to have to write interface{} every time you write a generic function that doesn’t impose constraints on its type parameters. So in this design we suggest a type constraint any that is equivalent to interface{}.
Further unification possible: https://github.com/golang/go/issues/33232 https://github.com/golang/go/issues/33232
However I do agree this is making it somewhat confusing what is in a static and what is in a runtime position.
- majewsky 6y agoFrom what you quoted: > we suggest a type constraint any that is equivalent to interface{}. That's my point. They chose the keyword any to disambiguate the type constraint interface{} from the type interface{}.