4 ms·
If Go 2 is bringing us generics, then couldn't that `builtin` package provide real type signatures for the builtin functions instead of fake ones? Instead of
by vorg 8y ago
If Go 2 is bringing us generics, then couldn't that `builtin` package provide real type signatures for the builtin functions instead of fake ones? Instead of
func delete(m map[Type]Type1, key Type)
it could have
func Delete(type Type, Type1 somecontract) (m map[Type]Type1, key Type)
in there, and a program compiled with Go 2 would have an implied instance of
func delete = builtin.Delete(T, U)
in its global namespace for every map with a `delete` used somewhere in the code.