<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 24, 2017, at 6:45 PM, Drew Crawford &lt;<a href="mailto:drew@sealedabstract.com" class="">drew@sealedabstract.com</a>&gt; wrote:</div><div class=""><p class="airmail_on" style="font-family: Helvetica, Arial; font-size: 13px; 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;">On March 24, 2017 at 7:53:09 PM, Jonathan Hull (<a href="mailto:jhull@gbis.com" class="">jhull@gbis.com</a>) wrote:</p><div style="font-family: Helvetica, Arial; font-size: 13px; 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=""><blockquote type="cite" class="clean_bq" style="font-family: Helvetica, Arial; font-size: 13px; 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;"><span class=""><div class=""><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px; 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="">It isn’t the fact that there are multiple models, but they way those models interact with each other in the brain. &nbsp;You can actually have lots of different models without causing confusion, as long as the models fit well together. &nbsp;It also isn’t the number of access levels that is a problem. &nbsp;For example, you can have a ton of shirt sizes (XS, S, M, L, XL, XXL, 3XL) and it doesn’t cause more confusion as you add more sizes because they don’t conflict with one another.</div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px; 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=""></div><div style="font-family: 'helvetica Neue', helvetica; font-size: 14px; 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="">A big part of the issue with our current access scheme is how similar the concepts are without being the same. &nbsp;That is then made worse by the fact that they have been given similar names.</div></div></span></blockquote></div><p style="font-family: Helvetica, Arial; font-size: 13px; 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="">It is unclear what distinction you intend to draw here. &nbsp;For example, value types and reference types are similar without being the same. &nbsp;The names of both concepts also contain the substring "type". &nbsp;So the difference you draw between that situation and the private/fileprivate situation is not immediately clear.</p></div></blockquote><div>The distinction between value and reference types is one of the most confusing aspects of learning to program. We are helped a bit by the fact that we use the concrete Class, Struct, and Enum. &nbsp;Many programmers just think of Classes as behaving differently than Structs/Enums and don’t really think about it as value vs reference. &nbsp;We never write valueType or referenceType in swift (only when having abstract discussions here on Evolution). &nbsp;Notice also that swift doesn’t use the term “pass-by-reference”. &nbsp;It has explicitly avoided using those terms in actual swift code.</div><div><br class=""></div><div>I agree with you about statically vs dynamically dispatched being an issue. &nbsp;For the most part, Swift tries to make it so we don’t ever have to think about it, but when the distinction does poke through, it can be confusing. &nbsp;I think we will need to do some redesign work here when more dynamic features are added. &nbsp;I had a proposal a while back to allow power users to force static dispatch by disambiguating the implementation which gets used. I will probably re-propose that when it seems in scope.</div><div><br class=""></div>It may help if I clarify that a mental model is not how something actually works, but rather our model of how we *think* it works. &nbsp;Mental models are almost always incorrect, but they are good enough to get by... for the most part. (<a href="https://www.nngroup.com/articles/mental-models/" class="">https://www.nngroup.com/articles/mental-models/</a>)</div><div><br class=""></div><div>In your examples above, Swift is projecting a system image which is much simpler than the underlying concepts (e.g. your statement about static vs dynamic typing that: "I would guess the vast majority of Swift developers are not aware there's a difference at all”). &nbsp;This helps to avoid confusion (except where rough spots poke through the facade).</div><div><br class=""></div><div>For access controls, the user is being presented with the full complexity of that choice directly.</div><div><blockquote type="cite" class=""><div class=""><p style="font-family: Helvetica, Arial; font-size: 13px; 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="">Here we have two superficially similar tools with slightly different features and performance characteristics, and for most problems it does not even matter which one you choose. &nbsp;</p></div></blockquote>This is exactly the problem. Both for access controls and dispatch.</div><div><br class=""><blockquote type="cite" class=""><div class=""><p style="font-family: Helvetica, Arial; font-size: 13px; 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="">IMO shipping a full toolbox with plenty of overlap is one of the core values of Swift.</p></div></blockquote>Is it? &nbsp;Can you point to an instance where a member of the core team said they are aiming for “plenty of overlap”?</div><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class=""><div style="font-family: Helvetica, Arial; font-size: 13px; 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=""><blockquote type="cite" style="font-family: Helvetica, Arial; font-size: 13px; 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; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; padding-left: 5px; border-left-width: 1px !important; border-left-color: rgb(0, 64, 128) !important;" class="">Do you feel that allowing both scoped private &amp; file-based private is actually important enough to warrant the significant design work it would take to bring it up to par with these other features?&nbsp;</blockquote></div><p style="font-family: Helvetica, Arial; font-size: 13px; 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="">It is not clear to me what design work is actually outstanding. &nbsp;I would love to see submodules, but that seems only indirectly related to visibility keywords, and I'm not aware of what you seem to believe we need.</p><p style="font-family: Helvetica, Arial; font-size: 13px; 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="">I do use scoped access extensively, and I've left some examples of that upthread.</p></div></blockquote><div>Honestly, most of your examples could just be split into multiple files. They might also benefit from submodules.</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div style="font-family: Helvetica, Arial; font-size: 13px; 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=""><blockquote type="cite" style="font-family: Helvetica, Arial; font-size: 13px; 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; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; padding-left: 5px; border-left-width: 1px !important; border-left-color: rgb(0, 64, 128) !important;" class="">It is not impossible, but it really doesn’t feel worth the effort to me (say compared to using that time/energy/thought to check off features from the generics manifesto).</blockquote></div><p style="font-family: Helvetica, Arial; font-size: 13px; 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="">Rather, as Carl Brown argued, it would take a lot of time/energy to migrate even the official projects off of private/fileprivate. &nbsp;Keeping what we have is free, change is what is expensive, and this proposal is change.</p></div></blockquote><div>You are conflating effort by the swift design and implementation community with your personal effort around migration.</div><div>&nbsp;</div><br class=""><blockquote type="cite" class=""><div class=""><div style="font-family: Helvetica, Arial; font-size: 13px; 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=""><blockquote type="cite" style="font-family: Helvetica, Arial; font-size: 13px; 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; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; padding-left: 5px; border-left-width: 1px !important; border-left-color: rgb(0, 64, 128) !important;" class="">&nbsp;In general, Swift is an opinionated language</blockquote></div><p style="font-family: Helvetica, Arial; font-size: 13px; 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="">Not clear what you mean here either. &nbsp;Swift is clearly less opinionated than ObjC for example. &nbsp;I am having trouble connecting this claim to a practical application.</p></div></blockquote>Oh, that is a quote from Lattner, when he was describing the core philosophy behind Swift. &nbsp;Others can probably dig up the actual quote. It has been repeated over and over.</div><div><br class=""></div><div><br class=""></div><div><br class=""><br class=""></div><div><br class=""></div><br class=""></body></html>