[swift-evolution] [Draft] Mixins

Антон Жилин antonyzhilin at gmail.com
Sun Feb 28 13:33:33 CST 2016

"Mixins" is as an extension for POP that adds the ability to mix in stored
properties. Deciding by possibilities/power:
protocol < class
[protocol, mixin] ~= class
~= means approximately equals

Classes are still more powerful in that they can be reference counted and
can form hierarchies of fully defined types. For all other purposes:
[protocol, mixin] = class

So we still have OOP and POP (class and struct), but POP gets enhanced.

> >* On Feb 28, 2016, at 09:02, Trent Nadeau via swift-evolution <swift-evolution at swift.org <http://swift.org>> wrote:
> *> >* In the proposal, I would recommend stressing how this both subsumes abstract classes and allows similar functionality on value types.
> *>
> On the subject of ‘subsuming’…  it seems with this proposal we now have three approaches to solving the problem of code reuse/specialization: OOP, POP, and Mixin Oriented Programming (MOP).  The decision about which approach to use makes the learning curve steeper.  Perhaps there is some way to generalize or unify the three approaches, and flatten the learning curve?
> In any case, I’m hesitant to add new directions to the language until the current ones have been given the benefit of some more time.
> Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160228/b570e924/attachment.html>

More information about the swift-evolution mailing list