5 ms·
I'm not sure how using mixins is better. Now you don't know half the time what is overriding what. Composition seems to be the better tool IMHO.
by arcosdev 7y ago
I'm not sure how using mixins is better. Now you don't know half the time what is overriding what. Composition seems to be the better tool IMHO.
- dyeje 7y agoAren'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...