News for hackers. Stuff that matters.
Re:OOP Is Dead, Long Live OOP by pitaj on Thursday October 18, 2018 @04:04PM (#18251661)
Mixins can be modeled as inheritance or as composition.
Re:OOP Is Dead, Long Live OOP by dragonwriter on Thursday October 18, 2018 @05:30PM (#18252310)
They can be modeled as inheritance or as composition plus delegation, but that's not saying much since inheritance itself can be modelled as composition plus delegation.
Re:OOP Is Dead, Long Live OOP by dvlsg on Thursday October 18, 2018 @04:23PM (#18251794)
I think composition and mixins should be kept separate. In my mind (and maybe I have an incorrect view of it), mixins throw a bunch of new properties on the base object, whereas composition keeps the original object encapsulated in a single property. Would you consider the second type to be a mixin? I've never heard it described that way.
Re:OOP Is Dead, Long Live OOP by seanmcdirmid on Thursday October 18, 2018 @04:10PM (#18251703)
Both Flavor-style mixins and Bracha style mixins utilize inheritance. All mixin definitions should fan out from that early work.