[swift-evolution] [Proposal] Explicit Non-Default-Implemented Protocol Requirements

Tino Heth 2th at gmx.de
Wed Aug 2 05:26:17 CDT 2017


> That would work as well, but it has the downside of forcing a potentially huge number of methods to be implemented in a single place, reducing the readability as opposed to packing them into semantically related groups in the form of extensions.
I really don't get why people are so obsessed with same-file extensions:
They are recommended in style guides, influencers blog about them, and they motivated a ridiculous complex change in the access rights system. Yet I haven't seen any evidence that they offer real benefit.
Extensions are great for adding useful helpers to existing types, and still allow you to selectively expose details of your own classes — but most people seem to ignore those options and focus on something can be done better with plain old comments.
[sorry for the rant — but I think a critical look at extensions is long overdue: I rarely see someone questioning their role, so basically, we are making important decisions based on pure superstition]

A protocol itself is already a vehicle to group related methods, and if you have a huge entity, it doesn't get better just because you split it and hide its complexity.

> Also, please include the original message for reference purposes.
[hopes Discourse will happen soon ;-) ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170802/7008556b/attachment.html>


More information about the swift-evolution mailing list