<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="">Like others, I do find the details of this proposal hard to follow. It doesn’t seem like a simpler mental model for developers.</div><div class=""><br class=""></div><div class="">However, I also find the <i class="">current</i> rules around extension access modifiers hard to follow. It’s confusing that “public extension” changes the default for members, when “public class” and “public struct” don’t. And this is not ideal:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 10.5px; line-height: normal; font-family: Menlo; color: rgb(88, 126, 168);" class=""><div style="margin: 0px; font-size: 10.5px; line-height: normal; color: rgb(102, 139, 73);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #323e7d" class="">extension</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> </span><span style="font-variant-ligatures: no-common-ligatures; color: #587ea8" class="">String</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">: </span><span style="font-variant-ligatures: no-common-ligatures; color: #587ea8" class="">Fungible</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp; </span><span style="font-variant-ligatures: no-common-ligatures" class="">// Extension not “public”, but the conformance is public?</span></div></div></div><div class=""><br class=""></div><div class="">IMO, every public API commitment a module makes should include the word “public” at the declaration site.</div><div class=""><br class=""></div><div class="">Because of all this, I have stopped using extension-level access modifiers altogether, instead always specifying access at the member level. I would be interested in a proposal to improve the current model — perhaps, for example, making “public extension” apply only to a protocol conformance, and disabling access modifiers on extensions that don’t have a protocol conformance.</div><div class=""><br class=""></div><div class="">Cheers, P</div><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 16, 2016, at 11:36 AM, Adrian Zubarev 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="bloop_markdown" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254);"><p style="margin: 15px 0px; -webkit-margin-before: 0px;" class="">If it’s possible I’d like to withdraw this proposal. I’m convinced by the feedback from the community. Feel free to reject it. ;)</p></div><div class="bloop_original_html" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254);"><div id="bloop_sign_1468686867154649856" class="bloop_sign"><div style="font-family: helvetica, arial; font-size: 13px;" class="">--&nbsp;<br class="">Adrian Zubarev<br class="">Sent with Airmail</div></div><br class=""><p class="airmail_on" style="margin: 15px 0px;">Am 13. Juli 2016 um 19:33:00, John McCall via swift-evolution (<a href="mailto:swift-evolution@swift.org" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;" class="">swift-evolution@swift.org</a>) schrieb:</p><blockquote type="cite" class="clean_bq" style="margin: 15px 0px;"><span style="margin-top: 0px; margin-bottom: 0px;" class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""></div><div class=""><div class=""><blockquote type="cite" class="" style="margin: 15px 0px;"><div class="" style="margin-top: 0px;">On Jul 13, 2016, at 10:26 AM, Xiaodi Wu via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">swift-evolution@swift.org</a>&gt; wrote:</div><div class="" style="margin-bottom: 0px;">As Jordan mentioned, I don't (and I think other people don't) think of extensions as their own entities, as they can't be referred to and have no runtime representation. In that mental model, there isn't such a thing as "an extension being public." Instead, the access modifier is just a shorthand default for the properties and methods it contains, which is teachable but unique to extensions. It is a matter of opinion whether that uniqueness is a feature or a bug.<br class=""></div></blockquote><div class=""><br class=""></div>I would say that it's interesting but ultimately not worth the confusion about the nature of extensions.</div><div class=""><br class=""></div><div class="">John.</div><div class=""><br class=""><blockquote type="cite" class="" style="margin: 15px 0px;"><div class="" style="margin-top: 0px; margin-bottom: 0px;"><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Jul 13, 2016 at 12:19 Jose Cheyo Jimenez &lt;<a href="mailto:cheyo@masters3d.com" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">cheyo@masters3d.com</a>&gt; wrote:<br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div dir="auto" class="" style="margin-top: 0px;"><div class=""></div><div class=""><br class=""></div><div class=""><br class="">On Jul 13, 2016, at 8:46 AM, Xiaodi Wu via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">swift-evolution@swift.org</a>&gt; wrote:<br class=""><br class=""></div><blockquote type="cite" class="" style="margin: 15px 0px;"><div class="" style="margin-top: 0px; margin-bottom: 0px;"><div dir="ltr" class=""><br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Jul 13, 2016 at 4:04 AM, Rod Brown via swift-evolution<span class="Apple-converted-space">&nbsp;</span><span dir="ltr" class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">swift-evolution@swift.org</a>&gt;</span><span class="Apple-converted-space">&nbsp;</span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div class="" style="margin-top: 0px; margin-bottom: 0px; word-wrap: break-word;"><div class="">Proposal link:<span class="Apple-converted-space">&nbsp;</span><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0119-extensions-access-modifiers.md" target="_blank" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">https://github.com/apple/swift-evolution/blob/master/proposals/0119-extensions-access-modifiers.md</a></div><div class=""><br class=""></div><div class=""><blockquote type="cite" class="" style="margin: 15px 0px;"><span class="" style="margin-top: 0px; margin-bottom: 0px;">* What is your evaluation of the proposal?<br class=""></span></blockquote><div class="">-1.&nbsp;Extensions appear to me to follow the access control of the rest of Swift: Implicit to the type you are extending, and you can either / both declare as part of the extension declaration or on the method. I don’t see how this is confusing, and I expect people will be more confused that extensions don’t follow the convention of the rest of Swift for Access Control.</div></div></div></blockquote><div class=""><br class=""></div><div class="">So, actually, the proposal is correct that extensions (at least once fileprivate/private is implemented) don't follow the access control rules for the rest of Swift. There is a problem to be addressed. However, I agree that this proposal hasn't identified the issue or adequately explained how the solution solves it. Here's the problem I'm thinking of:</div><div class=""><br class=""></div><div class="">```</div><div class="">public struct foo {</div><div class="">&nbsp; func frobnicate() { } // implicitly internal</div><div class="">}</div><div class=""><br class=""></div><div class="">public struct bar { }</div><div class="">public extension bar {</div><div class="">&nbsp; func frobnicate() { } // implicitly public</div><div class="">&nbsp; // at least, according to the revised rules explained in SE-0025</div><div class="">}</div><div class="">```</div></div></div></div></div></blockquote><div class=""><br class=""></div></div><div dir="auto" class=""><div class="">There is definitely a difference, I think that is a good thing.<span class="Apple-converted-space">&nbsp;</span><span class="" style="background-color: rgba(255, 255, 255, 0);">They look similar but they are completely different.&nbsp;</span></div><div class=""><br class=""></div><div class="">public Type // the type is public</div><div class="">public extension Type // &nbsp;the extension is public&nbsp;</div><div class=""><br class=""></div><div class="">For extensions, public is just a modifier on extension, not the type. The default scope inside the extension is that of the "modifier" keyword on the extension.&nbsp;</div><div class=""><br class=""></div><div class="">This is easy to explain to someone new.&nbsp;</div></div><div dir="auto" class="" style="margin-bottom: 0px;"><div class=""><br class=""></div><br class=""><blockquote type="cite" class="" style="margin: 15px 0px;"><div class="" style="margin-top: 0px; margin-bottom: 0px;"><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></div><div class="">This is an inconsistency that may (and IMO, really is) worth addressing. If there's adequate interest, I can circulate a draft with a proposed solution I have in mind.</div><div class="">&nbsp;</div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div class="" style="margin-top: 0px; word-wrap: break-word;"><div class=""><span class=""><br class=""></span><blockquote type="cite" class="" style="margin: 15px 0px;"><span class="" style="margin-top: 0px; margin-bottom: 0px;">* Is the problem being addressed significant enough to warrant a change to Swift?<br class=""></span></blockquote><div class="">I don’t think this warrants a change.</div><span class=""><br class=""></span><blockquote type="cite" class="" style="margin: 15px 0px;"><span class="" style="margin-top: 0px; margin-bottom: 0px;">* Does this proposal fit well with the feel and direction of Swift?<br class=""></span></blockquote>No. This seems to go against the direction of Swift.</div><div class=""><span class=""><br class=""></span><blockquote type="cite" class="" style="margin: 15px 0px;"><span class="" style="margin-top: 0px; margin-bottom: 0px;">* If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?<br class=""></span></blockquote><div class="">No.</div><div class=""><span class=""><br class=""></span></div><blockquote type="cite" class="" style="margin: 15px 0px;"><span class="" style="margin-top: 0px; margin-bottom: 0px;">* How much effort did you put into your review? A glance, a quick reading, or an in-depth study?</span></blockquote>A reading of the proposal.</div><div class=""><br class=""></div></div><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""><br class="" style="margin-bottom: 0px;"></blockquote></div><br class=""></div></div></div></blockquote><blockquote type="cite" class="" style="margin: 15px 0px;"><div class="" style="margin-top: 0px; margin-bottom: 0px;"><span class="">_______________________________________________</span><br class=""><span class="">swift-evolution mailing list</span><br class=""><span class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">swift-evolution@swift.org</a></span><br class=""><span class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br class=""></div></blockquote></div></blockquote></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></blockquote></div><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" style="color: rgb(65, 131, 196); background-color: inherit; text-decoration: none;" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></div></span></blockquote></div><div class="bloop_markdown" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254);"><div style="margin: 15px 0px; -webkit-margin-before: 0px;" class=""><br class="webkit-block-placeholder"></div></div><span style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254); float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254);" class=""><span style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254); float: none; display: inline !important;" class="">swift-evolution mailing list</span><br style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254);" class=""><a href="mailto:swift-evolution@swift.org" style="color: rgb(65, 131, 196); background-color: rgb(254, 254, 254); text-decoration: none; font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">swift-evolution@swift.org</a><br style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254);" class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" style="color: rgb(65, 131, 196); background-color: rgb(254, 254, 254); text-decoration: none; font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254);" class=""></div></blockquote></div><br class=""></body></html>