Parametric Polymorphism

written by Ryan Olshan on Saturday, December 17 2005

What is parametric polymorphism? It sounds like such a cool phrase. Parametric polymorphism is a function or datatype that can be written generically so that it can deal equally well with any objects without depending on their type. .NET Generics are derived from the principles of parametric polymorphism.

There is even a formula for parametric polymorphism.

"Any dynamically typed function f that takes n arguments can be given a static type using parametric polymorphism: f : p1 × ... × pn → r, where p1, ..., pn and r are type parameters."

What practical bearing does this formula have on .NET Generics? Nothing, but I'm a math person and I think formulas are cool.

R

Kick this post on .NET Kicks

Similar Posts

  1. IEnumerable<> and IEnumerable
  2. Dev Connections Day 2
  3. I'm now part of the Firefox crowd

Comments

  • Peter Brunone on on 12.17.2005 at 11:31 PM

    Peter Brunone avatar

    Whoa.



    Apparently Scott Mitchell has perfected the art of cloning.


Post a comment