<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 14, 2016, at 8:51 PM, Joe Groff 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 style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: 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=""><blockquote type="cite" class=""><div class=""><br class="Apple-interchange-newline">On Mar 14, 2016, at 8:36 PM, Patrick Pijnappel 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 dir="ltr" class="">Another +1 for James' idea to use private(module), private(file), private:<br class=""><div class="">- It avoids ambiguity whether internal/private/local is more restrictive and replaces it with a single axis, public vs. private.<br class=""></div><div class="">- The two longer terms, private(module) and private(file), are the least used ones.</div><div class="">- As mentioned by Joe, it admits clean extension to groupings between file and modules in the future (e.g. submodules).</div><div class=""><br class=""></div><div class="">The only question is (as Sean mentioned) how this combines with the syntax for setter access level, e.g. the current private(set). Options:</div><div class="">- Unnamed 2nd argument, giving private(file), private(file, set), private(set).</div></div></div></blockquote><div class=""><br class=""></div><div class="">We could conceivably reskin private(set) too. A lot of people complain it's "weird" as-is, for better or worse.</div><div class=""><br class=""></div><div class="">-Joe</div><br class=""></div></div></blockquote><br class=""></div><div>That’s because it is weird :)</div><div><br class=""></div><div>I always thought the computed form should be:</div><div><br class=""></div><div><font face="Menlo" class="">public var whatever: String {</font></div><div><font face="Menlo" class="">&nbsp; &nbsp; get { … }</font></div><div><font face="Menlo" class="">&nbsp; &nbsp; // override overall visibility to restrict setter</font></div><div><font face="Menlo" class="">&nbsp; &nbsp; private set { … }</font></div><div><font face="Menlo" class="">}</font></div><div><br class=""></div><div><br class=""></div><div>For this proposal you could do something like:</div><div><br class=""></div><div><span style="font-family: Menlo;" class="">var private set whatever: String = ""</span></div><br class=""><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Russ</div></body></html>