Skip to content

trait

noun

  1. inherited biological feature
L28947 on Wikidata ↗

Wiktionary

Pronunciation: /tɹeɪt/ / /tɹeɪ/

noun

Etymology: Borrowed from Middle French trait (“line, feature”), from Latin tractus (“drawing, pulling”), from Latin trahō. Doublet of tract.

  1. An identifying characteristic, habit or trend.

    inherited traits and acquired traits

    The number one personality trait I hate is hypocrisy. Why can't you be consistent!?

  2. An uninstantiable collection of methods that provides functionality to a class by using the class’s own interface.

    Traits are somewhat between an interface and a mixin.

    Traits are parametrized on other methods, which must be provided to create a class using the trait. Using a trait-like mechanism to compose large collections of mutually-dependent classes or traits could lead to parameter explosion.