5 ms·
Go "lists" are type dynamic -- "generics" in the most important place for generics to be.
by personZ 12y ago
Go "lists" are type dynamic -- "generics" in the most important place for generics to be.
- steveklabnik 12y agoHeterogeneous lists are not "generics."
- personZ 12y agoA Go map is of the defintion map[KeyType]ValueType. A Go slice and dynamic array is similar typed. That isn't heterogeneous, it isn't of type object, and is 99% of the common use of generics. Yeah, the native fundamental collections are generic.
- steveklabnik 12y agoI have a feeling we're talking about different things: when people speak about Go generics, they mean that the language doesn't support parametric polymorphism. Yes, some of the built-in types are special. That's not the point.