Search code examples
javascriptgenericspolymorphismgeneric-programming

Parametric Polymorphism (Generic Programming) not supported in Javascript?


I cannot find any information on Generic Programming in Javascript. So I assume it is not supported. Is it true? Is there anything that comes close?

Parametric Polymorphism http://en.wikipedia.org/wiki/Parametric_polymorphism

Generic Programming http://en.wikipedia.org/wiki/Generic_programming


Solution

  • JavaScript is dynamically duck typed. Generics don't make sense in that context. There aren't static types. It being supported or not is nonsensical.