<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>How about:<br><br>var whatever: String {</div><div id="AppleMailSignature"> private(file) set // default implementation</div><div id="AppleMailSignature">}</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">And</div><div id="AppleMailSignature"><br></div><div id="AppleMailSignature">var whatever: String {</div><div id="AppleMailSignature"> private set {</div><div id="AppleMailSignature"> return "custom"</div><div id="AppleMailSignature"> }</div><div id="AppleMailSignature">}</div><div><br>On 15 Mar 2016, at 05:12, Russ Bishop via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8"><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 14, 2016, at 8:51 PM, Joe Groff via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> 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 <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> 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=""> get { … }</font></div><div><font face="Menlo" class=""> // override overall visibility to restrict setter</font></div><div><font face="Menlo" class=""> 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></div></blockquote><blockquote type="cite"><div><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>