I have created a pull request, because no suggestions have been added in
two days. Here it is:
https://github.com/apple/swift-evolution/pull/188
Link to the proposal:
# Mixins
* Proposal: [SE-NNNN](https://github.com/Anton3/swift-evolution/blob/mixins/proposals/NNNN-mixins.md)
* Author(s): [Anton3](https://github.com/Anton3)
* Status: **Awaiting review**
* Review manager: TBD
## Introduction
Add [mixins](https://en.wikipedia.org/wiki/Mixin), which contain both protocol requirements and stored properties. Mixins will subsume abstract class functionality and allow similar functionality on structs. They will also allow for safe multiple inheritance, defining standard "bricks" carrying interface, implementation and state, which can be reused in multiple types.
Swift-evolution thread: [link](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160222/011220.html) (the threads are broken, search for "Mixins")
## Motivation
### World objects example
Consider the following code (this could be part of a game):
```swift
This file has been truncated. show original
I worry about syntax of renaming in "Resolving conflicts" section:
var y = B.x
func g(arg: Type) = B.f
But it's the best I can think of. Ideas are welcome, as always.
That said, I don't think it's a flaw strong enough not to start a review.