[swift-evolution] [Review] SE-0169: Improve Interaction Between private Declarations and Extensions

Rudolf Adamkovič salutis at me.com
Sun Apr 16 18:33:07 CDT 2017

> On 17 Apr 2017, at 00:46, David Hart <david at hartbit.com> wrote:

Reply below.

> And it's a style that is so widely used by the Swift community that even if you think it's a bad practice does not change the fact that many people use that style and that the current access level rules don't play well with them.

Just because it’s widely used doesn’t mean it’s a good idea. Remember, Swift is still very young. SOLID and other “old school" OOP principles are way older and proven to work at this point. For example, as an iOS contractor, I very, very often see extensions used for “code organization” of massive view controllers. It’s easy to do and looks pretty. But that’s just putting lipstick on a pig. Of course, this is just anecdotal evidence and a personal opinion. By no means I’m saying I’m right. Just sharing my view and voting. I may be wrong of course, especially among very smart people that are here.

>> It results in types with many responsibilities. In such cases, it's time to extract collaborator types.
>> But it sure looks prettier.
>> R+
>> Sent from my iPhone


More information about the swift-evolution mailing list