mixin

noun

mixin

noun

/ˈmɪksɪn/

Etymology Deverbal from mix in.

1

An uninstantiable class that provides functionality to be inherited by a subclass.

Object-oriented programming

  • Traits are somewhat between an interface and a mixin, as an interface contains only method signatures, while a trait includes also the full method definitions; on the other side mixins include method definitions, but they can also carry state through attributes, while traits usually don't.
Synonyms
abstract base class
Related terms
mix-in, interface, trait

Entry derived from the Wiktionary, under licence CC BY-SA 4.0 — list of authors.