2 ms·
The trait itself is not the concrete implementation, since a trait can have many different concrete implementations. A trait is, for all, or at least most, int
by coldtea 4y ago
The trait itself is not the concrete implementation, since a trait can have many different concrete implementations.
A trait is, for all, or at least most, intents and purposes, an interface that can have an optional default implementation of some of the functions inside it.
Traits, interfaces and types can also, for all, or at least most, intents and purposes, play the same role. Define a contract of stuff implemented by a code entity.
Of course any added special semantics depend on the language.