# trait

Pronunciation: US say "TRAYT" /tɹeɪt/; UK

## Noun

1. An identifying characteristic, habit, or tendency that distinguishes a person, animal, or thing.
   - Simple: A special quality or habit that makes a person or thing easy to recognize.
   - _Curiosity is a trait shared by most successful scientists._
   - _Researchers studied which personality traits predict career success._
2. In object-oriented programming, a set of methods that cannot itself be instantiated and that adds behavior to a class through that class's own interface.
   - Simple: A set of ready-made methods that can be added to a class to give it extra abilities.
   - _The developer defined a trait so several classes could share the same validation logic._
   - _Rust programmers rely on traits to specify behavior that types must implement._

## Origin

This word was borrowed from Middle French trait ("line, feature"), which came from Latin tractus ("drawing, pulling"), from the verb trahō. It is a doublet of tract.

Source: DictionaryAI, https://dictionaryai.com/define/trait (written from Wiktionary data, CC BY-SA 4.0: https://creativecommons.org/licenses/by-sa/4.0/).
