4 ms·
lol, I hate the words "parametric polymorphism" had it as a question in an university exam and failed, because I only learned "generics" and "templates" xD lov
by k__ 9y ago
lol, I hate the words "parametric polymorphism" had it as a question in an university exam and failed, because I only learned "generics" and "templates" xD
love the concept tho
- willtim 9y agoThe problem with the word "generics" is that it already meant something else in programming language theory. If I used reflection to implement a serialisation function in Java or C#, it could be generic with respect to the data-type of the value passed in, but not parametric. A parametric polymorphic function strictly has the same behaviour for all types, a generic one has type-dependent behaviour. This matters of course when we want to reason about programs.