[swift-evolution] Proposal: Introduce User-defined "Dynamic Member Lookup" Types
Brent Royal-Gordon
brent at architechies.com
Sun Dec 10 07:59:56 CST 2017
> On Dec 9, 2017, at 10:32 AM, Xiaodi Wu via swift-evolution <swift-evolution at swift.org> wrote:
>
> On Sat, Dec 9, 2017 at 11:20 Steven Brunwasser <sbrunwasser at gmail.com <mailto:sbrunwasser at gmail.com>> wrote:
> Just wanted to give my 2¢
>
> ¢
> I don’t like empty protocols—they feel like an abuse of the feature.
>
> As has been discussed here before, protocols aren’t about bags of syntax but rather about semantics. Empty protocols are explicitly a demonstration of this settled principle and are very much consistent with the direction of Swift.
I also think it should be an attribute.
The last time I said this, I pointed out that this was a protocol which:
1. Has no formal members,
2. But imposes informal requirements enforced by the compiler,
3. Permits and uses arbitrary overloads, and
4. Cannot be usefully used in a generic context or as a type constraint,
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 looking less like a protocol by the day. The square-peg grooves in the round hole are getting deeper and more splintery with every revision.
--
Brent Royal-Gordon
Architechies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171210/04de9f60/attachment.html>
More information about the swift-evolution
mailing list