3 ms·
Perhaps click the words "parametric polymorphism" in that quote you keep using, and read a bit deeper. Or alternatively, scroll down and read the more detailed
by bunderbunder 12y ago
Perhaps click the words "parametric polymorphism" in that quote you keep using, and read a bit deeper. Or alternatively, scroll down and read the more detailed exposition on the subject in that same page you link. As is so often the case with technical jargon, a one-sentence definition does not necessarily capture the whole of the concept.
- colanderman 12y agoYes, phrases therein such as "Parametric polymorphism allows a function or a data type to be written generically, so that it can handle values identically without depending on their type." and "A function that can evaluate to or be applied to values of different types is known as a polymorphic function." further reinforce my point that a language can support parametric polymorphism without being statically typed. I don't see why this is not self-evident to you. Any program written in Scheme + static types is a valid program in plain Scheme. The addition of a typing system to the language does not necessarily imbue it with new capabilities, nor (as I showed above) does it necessarily alter the output of the compiler. (Note: I distinguish "typing system" from "type constructors". Obviously adding type constructors adds capability to the language. But typing systems and type constructors exist independently of each other: Prolog has no formal type system, but has type constructors; SQL has a formal type system but no type constructors.)