[swift-evolution] [Draft] Mixins
Haravikk
swift-evolution at haravikk.me
Sat Feb 27 06:03:42 CST 2016
Very interesting alternative!
I think my preferred implementation is to just add these capabilities to protocols directly, as I guess I just don’t see why we need to introduce a separate mixin type. Providing implementation directly within a protocol is definitely something I’d like in general; while extensions can be a nice way to structure complex protocols and types, sometimes simple cases just don’t really need them IMO, so that’d be nice as a general capability, not just for mixins.
> On 27 Feb 2016, at 09:59, Антон Жилин via swift-evolution <swift-evolution at swift.org> wrote:
>
> Some people opposed to Abstract Classes proposal (including myself) have said that mixins could solve the problem better.
> So I prepaired a proposal draft to add stored properties to protocols. Here it is:
> https://gist.github.com/Anton3/f0550922c1be0fc5447c <https://gist.github.com/Anton3/f0550922c1be0fc5447c>
>
> P.S. I added a `mixin` keyword in the beginning, but we can opt to just extend protocols, which I mention in "alternatives".
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160227/52ff7176/attachment.html>
More information about the swift-evolution
mailing list