<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>How about</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature"><div><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">- “public” -> symbol visible outside the current module.<br></span></font></div><div><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">- “package or module” -> symbol visible within the current module.<br></span></font></div><div><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">- internal -> symbol visible within the current file.<br></span></font></div><div><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">- “private” -> symbol visible within the current declaration (class, extension, etc).</span></font></div><div><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></font></div><div><font color="#000000"><span style="background-color: rgba(255, 255, 255, 0);">?</span></font></div><br>Sent from my iPhone</div><div><br>On 15 Mar 2016, at 00:49, James Berry via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br><br></div><blockquote type="cite"><div><span></span><br><blockquote type="cite"><span>On Mar 14, 2016, at 5:18 PM, Chris Lattner via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>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></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>To summarize the place we’d like to end up:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>- “public” -> symbol visible outside the current module.</span><br></blockquote><blockquote type="cite"><span>- “internal” -> symbol visible within the current module.</span><br></blockquote><blockquote type="cite"><span>- unknown -> symbol visible within the current file.</span><br></blockquote><blockquote type="cite"><span>- “private” -> symbol visible within the current declaration (class, extension, etc).</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>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. It also encourages “extension oriented programming”, at least it will when some of the other restrictions on extensions are lifted. 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 @testable.</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>The thing we need to know is what the spelling should be for the third one. Off hand, perhaps:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>fileprivate</span><br></blockquote><blockquote type="cite"><span>private(file)</span><br></blockquote><blockquote type="cite"><span>internal(file)</span><br></blockquote><blockquote type="cite"><span>fileaccessible</span><br></blockquote><blockquote type="cite"><span>etc</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Some other thoughts on the choice: </span><br></blockquote><blockquote type="cite"><span>- this will be a declaration modifier, so it will not “burn” a keyword.</span><br></blockquote><blockquote type="cite"><span>- if will be a uniquely Swift thing, so there is virtue in it being a googlable keyword.</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Thoughts appreciated.</span><br></blockquote><span></span><br><span></span><br><span>I like fileprivate, if that’s the only change. On the other hand, if we want to consider a broader change, what about:</span><br><span></span><br><span> private symbol visible within the current declaration (class, extension, etc).</span><br><span> private(module) symbol visible within the current module.</span><br><span> private(file) symbol visible within the current file.</span><br><span></span><br><span>James</span><br><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></body></html>