[swift-evolution] Ownership on protocol property requirements

Xiaodi Wu xiaodi.wu at gmail.com
Mon May 8 02:44:34 CDT 2017


On Mon, May 8, 2017 at 2:40 AM, Goffredo Marocchi via swift-evolution <
swift-evolution at swift.org> wrote:

> I can understand that, I am just wary of "let's do a partially detrimental
> change
>

The key here is that there is no detriment to this change. There's no
functionality that's being removed, only misleading syntax.


> no... we will... we will make it proper someday" kind of changes as they
> seldom work out. Argument labels for stored closures and callbacks are
> still lost for example :/...
>

That's a totally different issue. Someone needs to write the proposal and
implementation for that.

Also, while here we keep pushing things Core Team's way, Ted K. is asking
> for devs' help on swift-dev as there is concern that the currently accepted
> proposals may not make it with this year's new Swift version (second year
> in a row). Should we discuss features in scope for Swift 4.1+ only now?
>
> Sent from my iPhone
>
> On 8 May 2017, at 08:12, David Hart <david at hartbit.com> wrote:
>
>
> On 8 May 2017, at 09:03, Goffredo Marocchi <panajev at gmail.com> wrote:
>
> Over my dead body --random list dweller ;)
>
> Seriously though, I think the labels should be made to matter not removed
> if they do not matter now. I think this goes to a path where we should not
> take protocols as they should be true contracts for the API in question
> (default method in protocols make me think we have to write unit tests for
> a protocol which sounds mad... oh well) although some may argue the
> ownership info is implementation detail and on that point I may agree with
> you ;).
>
>
> Agreed. But we don’t have the time to bring meaning to them in time for
> Swift 4. Its better to make the language consistent now (disallowing a
> keyword which currently has no meaning) and allow ourselves to reintroduce
> later with correct semantics.
>
> Sent from my iPhone
>
> On 8 May 2017, at 07:57, David Hart via swift-evolution <
> swift-evolution at swift.org> wrote:
>
> Sounds great! It should be an easy one to get through,
>
> On 8 May 2017, at 08:35, Greg Spiers <gspiers at gmail.com> wrote:
>
>
>
> On Mon, May 8, 2017 at 6:26 AM, David Hart via swift-evolution <
> swift-evolution at swift.org> wrote:
>
>>
>>
>> On 7 May 2017, at 20:12, Xiaodi Wu via swift-evolution <
>> swift-evolution at swift.org> wrote:
>>
>> Today these keywords have no meaning inside a protocol, so clearly it
>> should be an error to use it in that context. I agree with Jordan that the
>> error should be on the protocol.
>>
>> It's entirely a different conversation whether the keyword should have
>> meaning or not. If it should, it seems to me it should be limited to
>> protocols that are limited to classes. But that's an additive feature we
>> can discuss later.
>>
>> The source-breaking bug fix that is more pressing today is removing
>> meaningless keywords that can be misleading to users, because they have no
>> effect but look like they should.
>>
>> Exactly the trap I fell into when I found this issue.
>
>
>>
>> Yup, +1. Who wants to write a proposal?
>>
>
> I'd like to give it a try. I can write up the proposal to remove the
> keywords in protocols and will post a draft here for further discussion.
>
>
>>
>> On Sun, May 7, 2017 at 11:00 Goffredo Marocchi via swift-evolution <
>> swift-evolution at swift.org> wrote:
>>
>>> It would be useful to have a longer discussion on this as... I think
>>> that weak has a place there and should be enforced as a protocol is the
>>> public facing interface/api for the types who decide to adopt it.
>>>
>>> Sent from my iPhone
>>>
>>> > On 7 May 2017, at 15:41, Adrian Zubarev via swift-evolution <
>>> swift-evolution at swift.org> wrote:
>>> >
>>> > browse
>>> _______________________________________________
>>> swift-evolution mailing list
>>> swift-evolution at swift.org
>>> https://lists.swift.org/mailman/listinfo/swift-evolution
>>>
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-evolution
>>
>>
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-evolution
>>
>>
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
>
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170508/0b416f44/attachment.html>


More information about the swift-evolution mailing list