Lesley's Digital Garden

Home

❯

Notes

❯

polymorphism

polymorphism

May 11, 2025

  • parent : programming languages MOC
  • computing/PL

Polymorphism enables a single operations on many types. It can happen either at compile-time or at runtime.

Kinds of Polymorphism

There are various kind of polymorphism. For example:

  • ad-hoc polymorphism (overloading, typeclasses, Rust Traits)
  • parametric polymorphism (i.e. generic functions)
  • subtyping polymorphism (OCaml objects)
  • inheritance
  • row polymorphism (OCaml objects and polymorphic variants, Elm records)

See Also

  • monomorphization
  • vtable

Graph View

  • Kinds of Polymorphism
  • See Also

Created with Quartz v4.5.2 © 2026. All notes are written in Obsidian.

  • GitHub Repository
  • Mastodon