<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><p class="" style="font-family: Helvetica, arial, sans-serif; font-size: 14px; -webkit-print-color-adjust: exact; margin: 0px 0px 15px;"></p><span style="font-size: 14px;" class="">From Ted.</span><br class=""><blockquote type="cite" class=""><p class="" style="font-family: Helvetica, arial, sans-serif; font-size: 14px; -webkit-print-color-adjust: exact; margin: 0px 0px 15px;">Relative to Swift 3, the bar for such changes is significantly higher:</p><ul class="" style="font-family: Helvetica, arial, sans-serif; font-size: 14px; -webkit-print-color-adjust: exact; margin: 15px 0px; padding-left: 30px;"><li class="" style="-webkit-print-color-adjust: exact; margin: 0px;">The existing syntax/API being changed must be&nbsp;<em class="" style="-webkit-print-color-adjust: exact; margin-top: 0px;">actively harmful</em>.</li><li class="" style="-webkit-print-color-adjust: exact; margin: 0px;">The new syntax/API must&nbsp;<em class="" style="-webkit-print-color-adjust: exact; margin-top: 0px;">clearly</em>&nbsp;be better and not conflict with existing Swift syntax.</li><li class="" style="-webkit-print-color-adjust: exact; margin: 0px;">There must be a&nbsp;<em class="" style="-webkit-print-color-adjust: exact; margin-top: 0px;">reasonably automatable migration path</em>&nbsp;for existing code.</li></ul></blockquote></div><div class=""><span style="font-size: 14px;" class=""><br class=""></span></div><div class=""><span style="font-size: 14px;" class="">I don’t think there is evidence that scope private in Swift3 is "actively harmful”.&nbsp;</span><br class=""><span style="font-size: 14px;" class="">Reverting to Swift2&nbsp;file-private&nbsp;as private is not&nbsp;<i class="">clearly</i>&nbsp;better.&nbsp;</span></div><div class=""><span style="font-size: 14px;" class="">The community has not&nbsp;converged on a clear winner.&nbsp;</span></div><div class=""><span style="font-size: 14px;" class=""><br class=""></span></div><div class=""><span style="font-size: 14px;" class="">The only positive thing here is that&nbsp;if we get rid of scope&nbsp;private then it will be easy to make private alias to&nbsp;file-private so no code will break, but we would be removing a feature so I would think this is a&nbsp;breaking change.&nbsp;</span></div><div class=""><span style="font-size: 14px;" class=""><br class=""></span></div><div class=""><span style="font-size: 14px;" class="">Would removing private and fileprivate by making them alias to internal also be a breaking change? Even if the code will still compile?</span></div><div class=""><span style="font-size: 14px;" class=""><br class=""></span></div><div class=""><span style="font-size: 14px;" class="">This is a linter problem. If people&nbsp;don’t want other people in their team to use scope private then make it part of the&nbsp;coding style.&nbsp;</span></div><div class=""><br class=""></div><div class=""><span style="font-size: 14px;" class="">If people do not want fileprivate because it looks ugly, then force everybody to use scope private using a linter&nbsp;like swiftlint.&nbsp;</span></div><div class=""><span style="font-size: 14px;" class=""><br class=""></span></div><div class=""><span style="font-size: 14px;" class=""><br class=""></span></div><div class=""><span style="font-size: 14px;" class=""><br class=""></span></div><div class=""><span style="font-size: 14px;" class=""><br class=""></span></div><div class=""><span style="font-size: 14px;" class=""><br class=""></span></div><div class=""><span style="font-size: 14px;" class=""><br class=""></span></div><div class=""><span style="font-size: 14px;" class=""><br class=""></span></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><span style="font-size: 14px;" class=""><br class=""></span></div><div class=""><span style="font-size: 14px;" class=""><br class=""></span></div><div class=""><span style="font-size: 14px;" class=""><br class=""></span></div><div class=""><span style="font-size: 14px;" class=""><br class=""></span></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 17, 2017, at 2:35 PM, Matthew Johnson via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class=""><blockquote type="cite" class="">On Feb 17, 2017, at 4:29 PM, Brent Royal-Gordon via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><br class=""><blockquote type="cite" class="">On Feb 17, 2017, at 12:29 AM, Slava Pestov via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><br class="">Personally I feel enforced encapsulation of implementation detail to the latter group is less important than the former, and can be handled by convention. Whereas other users of your module definitely benefit from access control and being able to consume a clearly-defined interface.<br class=""></blockquote><br class="">I think failing to provide some sort of below-`internal` privacy would be missing *really* low-hanging fruit for no good reason. The languages I can think of which don't include some sort of sub-library-wide privacy level—Objective-C, Javascript, Perl, Python—usually have very simple object designs with a flat namespace. (Well, there's Rust, but Rust lets you wrap anything you'd like in a module.) Even Objective-C in practice includes a `fileprivate` equivalent in the form of methods declared only in the .m file.<br class=""><br class="">I also think it's often helpful to be able to change a member's access level without having to change all references to it. Publishing or privatizing an interface is not an uncommon refactoring.<br class=""><br class="">Not everybody likes our current semantics, but that's no reason to throw the feature out entirely.<br class=""></blockquote><br class="">+1. &nbsp;I’d like to see `private` revert to the Swift 2 meaning, and hopefully we can reconsider using `scoped` as the keyword for scoped access rather than abandoning it. &nbsp;Does anyone remember why this was considered a bad idea?<br class=""><br class=""><blockquote type="cite" class=""><br class="">-- <br class="">Brent Royal-Gordon<br class="">Architechies<br class=""><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></blockquote><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></div></blockquote></div><br class=""></body></html>