[swift-evolution] Ownership on protocol property requirements
Xiaodi Wu
xiaodi.wu at gmail.com
Sun May 7 15:23:17 CDT 2017
On Sun, May 7, 2017 at 3:02 PM, Matthew Johnson <matthew at anandabits.com>
wrote:
>
>
> Sent from my iPad
>
> On May 7, 2017, at 1:12 PM, 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.
>
>
> Why would it make sense to limit this to class-constrained protocols? It
> would obviously make sense to limit it to properties of class or
> class-constrained type but I see no reason why an arbitrary restriction to
> class-constrained protocols would make sense even if that was how it is
> most commonly used.
>
You're quite right.
> 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.
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170507/e3c27678/attachment.html>
More information about the swift-evolution
mailing list