[swift-evolution] Renaming for Protocol Conformance

Chris Lattner clattner at apple.com
Wed Sep 7 00:43:20 CDT 2016

On Sep 6, 2016, at 6:06 PM, Jonathan Hull via swift-evolution <swift-evolution at swift.org> 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:

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.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160906/67b0c625/attachment.html>

More information about the swift-evolution mailing list