<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="">Ok, I guess we will wait for the core team (or perhaps Ilya) to return and advise then…<div class=""><br class=""></div><div class="">Thanks,</div><div class="">Jon</div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On Jun 16, 2016, at 7:33 AM, Robert Widmann &lt;<a href="mailto:devteam.codafi@gmail.com" class="">devteam.codafi@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class="">That is for migration. &nbsp;It does not affect the semantics of private at any level, it merely explains how we should go about the initial transition. &nbsp;"In many cases" private being equivalent to fileprivate could be read that way, but given the rest of the proposal I didn't take any artistic freedoms and don't believe we should without clarification.&nbsp;<br class=""><br class="">~Robert Widmann</div><div class=""><br class="">2016/06/16 2:00、Jonathan Hull &lt;<a href="mailto:jhull@gbis.com" class="">jhull@gbis.com</a>&gt; のメッセージ:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class="">From the Impact portion of the proposal:<div class=""><blockquote type="cite" class=""><span style="color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">The existing code will need to rename&nbsp;</span><code style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 14px; padding: 0.2em 0px; margin: 0px; background-color: rgba(0, 0, 0, 0.0392157); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; color: rgb(51, 51, 51);" class="">private</code><span style="color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">&nbsp;to&nbsp;</span><code style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 14px; padding: 0.2em 0px; margin: 0px; background-color: rgba(0, 0, 0, 0.0392157); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; color: rgb(51, 51, 51);" class="">fileprivate</code><span style="color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">&nbsp;to achieve the same semantics. In many cases the new meaning of&nbsp;</span><code style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 14px; padding: 0.2em 0px; margin: 0px; background-color: rgba(0, 0, 0, 0.0392157); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; color: rgb(51, 51, 51);" class="">private</code><span style="color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">&nbsp;is likely to compile as well and the code will then run exactly as before.</span></blockquote><br class=""></div><div class="">I believe the second sentence refers to the case where fileprivate and private are the same at the top level. &nbsp;I agree that the proposal is a bit vaguely/ambiguously written, but it in no way precludes the behavior everyone is saying was intended.</div><div class=""><br class=""></div><div class="">I know the current implementation just gives unannotated members the same access modifier as the outer scope’s, but that is an implementation detail. &nbsp;Furthermore it is entirely consistent with the interpretation given above in the case with only “fileprivate”, “internal”, and “public” scopes. &nbsp;It is only when we add the new “private” scope that there is a difference.</div><div class=""><br class=""></div><div class="">We have an ambiguous proposal which can be read in two different ways, but one of those ways is unworkable (the bug you mentioned), so I see no problem in interpreting it the other way (which just so happens to be the interpretation everyone says was intended) and moving forward. &nbsp;It is entirely consistent with the proposal.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jun 16, 2016, at 12:35 AM, Robert Widmann &lt;<a href="mailto:devteam.codafi@gmail.com" class="">devteam.codafi@gmail.com</a>&gt; wrote:</div><div class=""><div class="">~Robert Widmann<br class=""><br class="">2016/06/16 0:29、Jonathan Hull &lt;<a href="mailto:jhull@gbis.com" class="">jhull@gbis.com</a>&gt; のメッセージ:<br class=""><br class=""><blockquote type="cite" class="">They happen to be the same at the top level, but they are very different when dealing with nested types…<br class=""><br class="">A private member is visible inside it’s containing scope. &nbsp;For the top-level, that is the file. &nbsp;For a nested type, that is the outer type.<br class=""></blockquote><br class="">A wonderful idea, but not in the proposal. &nbsp;In fact, the singular example given therein runs directly counter to this idea by explicitly showing the scoping behavior of a private member.<br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">Chis Lattner’s response to the initial proposal (before the name fileprivate was chosen):</div><div class=""><blockquote type="cite" class=""><span style="font-family: arial, sans-serif; background-color: rgb(255, 255, 255);" class="">Per Doug’s email, the core team agrees we should make a change here, but would like some bikeshedding to happen on the replacement name for private.</span><br style="font-family: arial, sans-serif;" class=""><br style="font-family: arial, sans-serif;" class=""><span style="font-family: arial, sans-serif; background-color: rgb(255, 255, 255);" class="">To summarize the place we’d like to end up:</span><br style="font-family: arial, sans-serif;" class=""><br style="font-family: arial, sans-serif;" class=""><span style="font-family: arial, sans-serif; background-color: rgb(255, 255, 255);" class="">- “public” -&gt; symbol visible outside the current module.</span><br style="font-family: arial, sans-serif;" class=""><span style="font-family: arial, sans-serif; background-color: rgb(255, 255, 255);" class="">- “internal” -&gt; symbol visible within the current module.</span><br style="font-family: arial, sans-serif;" class=""><span style="font-family: arial, sans-serif; background-color: rgb(255, 255, 255);" class="">- unknown -&gt; symbol visible within the current file.</span><br style="font-family: arial, sans-serif;" class=""><span style="font-family: arial, sans-serif; background-color: rgb(255, 255, 255);" class="">- “private” -&gt; symbol visible within the current declaration (class, extension, etc).</span><br style="font-family: arial, sans-serif;" class=""><br style="font-family: arial, sans-serif;" class=""><span style="font-family: arial, sans-serif; background-color: rgb(255, 255, 255);" class="">The rationale here is that this aligns Swift with common art seen in other languages, and that many people using private today don’t *want* visibility out of their current declaration.&nbsp; It also encourages “extension oriented programming”, at least it will when some of the other restrictions on extensions are lifted.&nbsp; We discussed dropping the third one entirely, but think it *is* a useful and important level of access control, and when/if we ever get the ability to write unit tests inside of the file that defines the functionality, they will be a nicer solution to &lt;at&gt; testable.</span></blockquote><br class=""></div><div class="">As you can see the definition of “unknown” (now fileprivate) and “private” are exactly what I said. &nbsp;Many people wanted to name the new private “scoped” or “local" because of the way it worked, though “private” won in the end. &nbsp;As you see, they thought of getting rid of fileprivate, but decided it was necessary.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><blockquote type="cite" class="">Then we should amend the proposal posthaste!</blockquote></div><div class=""><br class=""></div><div class="">Basically, what I am saying here is that the intent is clear from the context (and original discussion) around the proposal. We all seem to agree about what needs to happen behavior-wise. &nbsp;At most this is a bug-fix, and shouldn’t require a full rehashing on evolution.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Jon</div><div class=""><br class=""></div><div class=""><br class=""></div></div></div></div></blockquote></div></div></blockquote></div><br class=""></div></body></html>