4 ms·
Your puzzling "generic set" isn't what is usually meant by a generic set in a statically typed language. A generic set would be defined disregarding the type o
by mietek 13y ago
Your puzzling "generic set" isn't what is usually meant by a generic set in a statically typed language.
A generic set would be defined disregarding the type of its elements: "set of ?s". However, a single instance of a generic set would only be allowed to contain members of a single type: "set of foos". This is called parametric polymorphism.