trait

Etymology

Borrowed from Middle French trait (“line, feature”), from Latin tractus (“drawing, pulling”), from Latin trahō, ultimately from Proto-Indo-European *tregʰ- (“to drag, pull?”), perhaps a variation of *dʰregʰ- (“to pull, draw, drag”). Doublet of tract.

noun

  1. (biology, psychology) An identifying characteristic, habit or trend.
    The number one personality trait I hate is hypocrisy. Why can't you be consistent!?
    The English, of all classes, value themselves on this trait, as distinguishing them from the French, who, in the popular belief, are more polite than true. 1856, Ralph Waldo Emerson, English Traits, Truth
    The positive and constructive aspect of possibility gives the key to understanding the two chief traits of immaturity, dependence and plasticity. 1916, John Dewey, Democracy and Education
    Turning to our second trait, if you have straight hair, then both of your parents must carry an allele for this trait. 2003, Robert S. Siegler, Judy S. DeLoache, Nancy Eisenberg, How Children Develop, Macmillan, page 89
  2. (object-oriented programming) 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. 2006, Nathaniel J. Nystrom, Programming languages for scalable software extension and composition

Attribution / Disclaimer All definitions come directly from Wiktionary using the Wiktextract library. We do not edit or curate the definitions for any words, if you feel the definition listed is incorrect or offensive please suggest modifications directly to the source (wiktionary/trait), any changes made to the source will update on this page periodically.