james at supmenow.com
Wed Dec 23 14:03:20 CST 2015
So Mixins are a way of opting in to shared behaviour.
Think of it as having default implementations for protocols
But in swift to do this you have to define a protocol, make your class extend from it and then extend the protocol with some methods
The downside is this isn't a true mixin implementation as typically Mixins allow you to specific properties.
So Mixins are closer to extensions with support for properties which you can include to multiple classes
Sent from my iPhone
> On 23 Dec 2015, at 19:57, Joe Groff <jgroff at apple.com> wrote:
>> On Dec 23, 2015, at 11:54 AM, James Campbell via swift-evolution <swift-evolution at swift.org> wrote:
>> Mixins would be a great addition instead of having to define a protocol and then extending it
> Mixins are a vague term. What exactly do you propose?
More information about the swift-evolution