<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div></div><div>I also agree with everything Jordan said!&nbsp;</div><div><br></div><div>-Thorsten&nbsp;</div><div><br>Am 25.03.2016 um 17:27 schrieb David Owens II via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt;:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div class=""><div><blockquote type="cite" class=""><div class="">On Mar 25, 2016, at 9:15 AM, Jordan Rose 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=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 24, 2016, at 16:20 , Erica Sadun 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=""><blockquote type="cite" style="font-family: Monaco; font-size: 11px; 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=""><br class="Apple-interchange-newline">On Mar 24, 2016, at 5:13 PM, Brent Royal-Gordon &lt;<a href="mailto:brent@architechies.com" class="">brent@architechies.com</a>&gt; wrote:<br class=""><br class=""><blockquote type="cite" class="">I think it does. `module` could mean many things related to how Swift creates and consumes modules.<span class="Apple-converted-space">&nbsp;</span><br class="">`moduleprivate` combines something about access levels (public/private) and scope (module), is easy to<span class="Apple-converted-space">&nbsp;</span><br class="">Google, offers few "wrong" interpretations. By using a longer keyword, it is less flexible in meaning and<span class="Apple-converted-space">&nbsp;</span><br class="">more fixed in purpose.<br class=""></blockquote><br class="">Sure, but is that worth 7 to 9 extra characters at every single use site for something that's actually pretty common? Is it worth the muddled mess of an all-lowercase keyword with no obvious break, or the attention-grabbing of a capital letter or an underscore?<br class=""><br class="">`module` and `file` are not going to be obscure corners of the language. Most people will probably learn about them at the same time they learn about `public` and `private`.<span class="Apple-converted-space">&nbsp;</span><br class=""><br class="">(Actually, if `module` continues to be the default, you probably won't see it *that* often. You *will* see `file`, but that's the one that can't be as easily confused with a declaration.)<br class=""><br class="">Obviousness for new users is great, but you can take it too far. We call the type `Int32`, not `SignedIntegerBetweenNegative2ToThe31stPowerAnd2ToThe31stPowerMinus1`—and if we did, it's not clear the longer name would really be more obvious, because it would be such a pain to read.<br class=""></blockquote><br style="font-family: Monaco; font-size: 11px; 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=""><br style="font-family: Monaco; font-size: 11px; 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=""><span style="font-family: Monaco; font-size: 11px; 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; float: none; display: inline !important;" class="">`moduleprivate` is the default value. I doubt it will get &nbsp;used much if at all. I don't think `fileprivate` will get used much either</span><br style="font-family: Monaco; font-size: 11px; 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=""><span style="font-family: Monaco; font-size: 11px; 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; float: none; display: inline !important;" class="">but in such cases, I think those seven extra letters are essential and documenting.</span><br style="font-family: Monaco; font-size: 11px; 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=""><br style="font-family: Monaco; font-size: 11px; 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=""><span style="font-family: Monaco; font-size: 11px; 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; float: none; display: inline !important;" class="">The two remaining public and private access levels are simple and intuitively obvious.</span><br style="font-family: Monaco; font-size: 11px; 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=""></div></blockquote></div><br class=""><div class="">I'm going to say that I remain unhappy with these new names. I don't believe that these won't get used, and I don't want them to feel awkward, discouraged, or penalized when they do. The standard library, for example, has in its style guide that all access control should be explicit, which is a reasonable style to enforce. I also have a small concern that they won't be easy to talk about: "this method is private" "wait, file-private or module-private?" "neither, just private-private".</div></div></div></blockquote><div><br class=""></div><div>I think this is a very important observation. Being able to talk about these levers is very important, especially in the context of teaching new people about the various levels of access control.</div><br class=""><blockquote type="cite" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I realize these are all vague concerns, and I don't have something more concrete—or a better alternative. "modulescoped" and "filescoped" would be very literally accurate but (a) would force people to learn what "scoped" means unnecessarily, and (b) aren't less awkward.</div><div class=""><br class=""></div><div class="">I agree with the concerns that just saying "file var foo" makes it sound like there's one copy of the variable shared in the entire file, even when applied to an instance property. I think there's a lot of value is making the access control terms adjectives.</div><div class=""><br class=""></div><div class="">I honestly still think "public, internal, private, local" is a better taxonomy.. It's true that "internal" and "private" aren't automatically ordered relative to each other (and maybe not even "local"), but they're all adjectives (unlike "module" and "file"), and they're not awkward to read or to use in conversation. But both the core team and the list disagree, mainly because (a) it aligns 'private' more closely with other languages, and (b) if you're not thinking about it, more restrictive is better than less. (Both of which I agree are good ideas.)</div></div></blockquote><div><br class=""></div><div>I agree 100% with this.&nbsp;</div><br class=""><blockquote type="cite" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">Jordan</div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></blockquote></div><br class=""></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>