[swift-evolution] Proposal: Introduce User-defined "Dynamic Member Lookup" Types
Joe DeCapo
snoogansbc at gmail.com
Sun Dec 10 13:24:30 CST 2017
> On Dec 10, 2017, at 8:00 AM, Brent Royal-Gordon via swift-evolution <swift-evolution at swift.org> wrote:
>
> None of which are true of ordinary protocols. Since then, we have added:
>
> 5. Can only be conformed to in the main declaration.
This is the main thing that made me think Letanyan's suggestion of an attribute might make more sense for this than just a normal protocol. I'm not really a fan of bifurcating the semantics with an attribute denoting "safe"/"unsafe" versions of the protocol. But if this restriction is accepted (which I think it must be in order to avoid some legitimate concerns), this is something that would be unique to this protocol that no other protocol has had to adhere to. If this type of requirement isn't made available more generally to protocols, then this would be a very special case that complicates the definition of what a protocol is. I'm curious to hear Chris's thoughts on Paul's feedback.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171210/b91b81b6/attachment.html>
More information about the swift-evolution
mailing list