On Sep 6, 2016, at 6:06 PM, Jonathan Hull via swift-evolution 
<[email protected]> wrote:
>> I'm not entirely sure on my position, though. To be convinced otherwise, I'd 
>> need to see a compelling real-world use case that demonstrates all of the 
>> following:
>> 
>> - Safety: perhaps, with protocols, unlike class inheritance, it is almost 
>> always safe to make these kinds of changes unanticipated by the original 
>> author--it would be good to see evidence either way
> 
> You may find this paper interesting:
> http://scg.unibe.ch/archive/papers/Scha02bTraits.pdf 
> <http://scg.unibe.ch/archive/papers/Scha02bTraits.pdf>
> 
> It discusses traits, which are basically Swift’s protocols, plus the ability 
> to handle conflicts.  It discusses at length the issues that arise with other 
> systems.
> 
> This is a very common problem that only a few programming languages have 
> found successful solutions to.  I would also point you to Eiffel’s model for 
> multiple inheritance (select, rename, undefine, export).  I think if we keep 
> working on it, we can find a uniquely swift-feeling solution which solves the 
> issue :-)

Here’s another obscure paper coming from the world of C++, see section 3.5/4.1:
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.48.129

Not a syntax that we would want to emulate, but it’s the same idea in different 
clothes.  The Swift implementation model should support implementing something 
along these lines, but it would be a purely additive feature.

-Chris

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to