[swift-evolution] [Proposal Draft] automatic protocol forwarding

Matthew Johnson matthew at anandabits.com
Thu Dec 31 13:18:58 CST 2015



Sent from my iPad

> On Dec 31, 2015, at 12:02 PM, David Owens II <david at owensd.io> wrote:
> 
> 
>> On Dec 31, 2015, at 9:47 AM, Matthew Johnson via swift-evolution <swift-evolution at swift.org> wrote:
>> 
>> No.  This is addressed in the proposal and the lazy collections motivating example I replied with last night.  I don’t think it’s a good idea to require this.
> 
> Can you put your proposal on GitHub under your swift-evolution fork? It’s really hard to follow the current state of the proposal and the changes over time.

It is up on my fork in the automatic-protocol-forwarding branch.  I haven't published the second draft yet.  I want to finish the second draft before updating Github.

I shared the section on lazy collections on the list last night because Dave specifically pointed me in that direction and I am interested in his feedback on it.

> 
> 
>> The forwardee needs to implement the members of the protocol but does not need to conform.  The forwarder will receive forwarding implementations of the members, but again does not need to declare conformance.  Forwarding is orthogonal to conformance, just as it is today when you manually write forwarding members today.
> 
> I cannot think of a time where I wanted this pseudo-conformance. The entire purpose of forwarding, that I’ve ever wanted or seen at least, is to act as a pass-through from the outer type’s conformance to a protocol to an internal specific implementor of that protocol without having to write all of the boiler-plate code to make that happen.
> 
> So I find it confusing that you say they are orthogonal.

If you have a look at the lazy collections example maybe it will start to make more sense.  I will also have other examples.  If you don't want to find the post from last night, just wait until I finish the second draft.  I will announce the second draft on list when it's ready.

> 
> -David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151231/0e678274/attachment.html>


More information about the swift-evolution mailing list