3 ms·
Aren't mixins a form of composition?
by dyeje 7y ago
Aren't mixins a form of composition?
- arcosdev 7y agoI would argue no they are not. I am thinking of their implementation in python specifically, so my understanding is likely skewed. My notion of composition with classes would be: class Dog(object): def __init__(): self.wagger = Wagger(); #composing the Wagger class in python mixins look like this: class Dog(object, WaggerMixin): ...etc...