Comment by amluto
2 days ago
> Protected and private inheritance are C++'s equivalent to traits
How so? Maybe in a COM-like world where the user of an object needs to call a method to get an interface pointer.
I’ll grant that concepts are a massive improvement.
In the sense of supporting mixins that don't necessarily pollute your public API. The overlap with other languages isn't perfect, and traits in the stdlib refer to a rather different template-based thing, but I don't think any language has the monopoly on a canon definition of traits. Certainly they're going to be different than traits in Self, which iirc coined the term.