What you're really after isn't "inheriting" from structs, you want to
easily "compose" your classes (or structs) using the implementation from
other implementation structs (components). I made a separate post all about
this - how to make composition part of the language.

On Fri, 23 Jun 2017 at 01:15 Mike Kluev via swift-evolution <
[email protected]> wrote:

> On 23 June 2017 at 02:43, Tony Allevato <tony.allevato at gmail.com
> <[email protected]>> wrote:
>
>> There's been talk about "protocol forwarding" that I think would achieve
>> a lot of these goals, without the sharp edges involved trying to define
>> inheritance between a class and a struct. The proposed feature would
>> eliminate the boilerplate you're talking about.
>>
>> I'm on my phone so I can't pull up links to old discussions, but Matthew
>> Johnson is who was pushing it so you may want to look back at what he's
>> said on the topic.
>>
>
> thanks, i skimmed through it now and will have a closer look later.
> does it address (2) though? (preexisting value types we can't change)
>
> as to the sharp edges: i do not see a single one in the "manual"
> implementation of this approach and the idea of this proposal is that it is
> equivalent to the manual implementation...
>
> Mike
>
> _______________________________________________
> swift-evolution mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to