From what I can tell from Scala and Hack-
Mixins:
- Can have state (ie. instance properties)
- Can only provide concrete methods
- Can have constructors, that are called in the same order that their classes were mixed in
- If
Amixes inBandC,A instanceof B == falseandA instanceof C == false
Traits:
- Can only provide methods, not state
- Can declare abstract methods, that a consumer must implement
- Cannot have constructors
- If
Aimplements traitsBandC,A instanceof B == falseandA instanceof C == false
Is this correct or am I missing anything ? Are these definitions accurate for any OO language or just for the above mentioned ones ?