4 ms·
Arrays/slices and maps are in fact provided as built-ins that function like generics, e.g. []foo and map[foo]bar work as expected, as do associated helper metho
by jimsmart 5y ago
Arrays/slices and maps are in fact provided as built-ins that function like generics, e.g. []foo and map[foo]bar work as expected, as do associated helper methods.
But those are the only container types with built-in support like that. (Channels can similarly be of any type)