trait
n.-
1 personality or character (n.) B2 Upper Intermediatea quality that is part of your personality.
a distinguishing feature of a person's character or nature.
ExamplePatience is a very important trait for a primary school teacher to have.
ExampleThe candidate's most impressive trait was her ability to remain composed under intense questioning from the board.
-
2 biological feature (n.) B2 Upper Intermediate Technical Sciencea physical quality that is passed from parents to children through genes.
a genetically determined characteristic or condition.
ExampleEye colour is a physical trait that you inherit from your parents.
ExampleResearchers are investigating which specific genetic traits make certain plant species more resistant to drought.
UsageOften used in the context of heredity and evolution.
Show 1 more senseShow fewer
-
3 computing (n.) C2 Proficiency Technical Computinga set of methods used in computer programming to give extra powers to a class.
a collection of methods that provides functionality to a class, used as a tool for code reuse in object-oriented programming.
ExampleThe programmer used a trait to share the same code between two different objects.
ExampleBy implementing the trait, the developer ensured that multiple classes could share the same logging behaviour without complex inheritance.
UsageCommon in languages like Rust, Scala, and PHP.
Teacher's tipThis is a highly specialized technical sense; general learners only need the character-based definition.
- interface
- mixin
Borrowed from Middle French trait (“line, feature”), from Latin tractus (“drawing, pulling”), from Latin trahō. Doublet of tract.