<div dir="ltr">On Sat, Mar 25, 2017 at 12:26 AM, Drew Crawford <span dir="ltr">&lt;<a href="mailto:drew@sealedabstract.com" target="_blank">drew@sealedabstract.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span class=""><div id="m_-2187208425999929640bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br></div> <br> <div id="m_-2187208425999929640bloop_sign_1490417503554199808" class="m_-2187208425999929640bloop_sign"><br></div><p class="m_-2187208425999929640airmail_on">On March 24, 2017 at 11:20:59 PM, Jonathan Hull (<a href="mailto:jhull@gbis.com" target="_blank">jhull@gbis.com</a>) wrote:</p> <div><blockquote type="cite" class="m_-2187208425999929640clean_bq" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span><div><span style="color:rgb(0,0,0);font-family:&#39;helvetica Neue&#39;,helvetica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);float:none;display:inline!important">You were the one who said redundancy was a *goal* of swift, which it is not.</span></div></span></blockquote></div></span><p>You misunderstand.  I&#39;m arguing that the design of Swift is to have concept pairs – private/fileprivate, class/struct, let/var – in which one element of the pair is a superset of the other.  That is: we could convert a let/var program to use only var, we could convert a private/fileprivate program to use only fileprivate, etc., and yet we stubbornly persist to have all these keywords.</p></div></blockquote><div>Again, this is deliberately ignoring the points made above. As we discussed with dispatch models, speed is a key goal of Swift, and `let` vs `var` offers optimization opportunities for the compiler. I&#39;ve never heard of anyone proposing that the design of Swift is based around concept pairs. Nor are those you listed pairs of anything: `private` and `fileprivate` are two of five access levels; there are not only classes and structs but also enums and tuples; `let` and `var` will shortly be joined by `inout` and `shared`, etc. Neither two, nor four, nor five are magic numbers. The question is, how many of whatever it is we&#39;re considering hold their own weight. The argument here is that new `private` does not.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><p>This property has been labeled &quot;redundancy&quot; by people who dislike it.  I&#39;m saying that whatever unkind name we decide to call it, it&#39;s a Swiftism, and we embraced it a long time ago.</p></div></blockquote><div>What is &quot;this property&quot; that you claim to be a &quot;Swiftism&quot;?</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><p>Perhaps I just do not understand your argument, but it seems to be</p><div><blockquote type="cite" style="font-family:Helvetica,Arial;font-size:13px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing: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">In your examples above, Swift is projecting a system image which is much simpler than the underlying concepts... For access controls, the user is being presented with the full complexity of that choice directly.</blockquote></div><p>This seems simply inaccurate to me.  For example, I am the top search result for &quot;swift struct or class&quot; and my explanation is 27 pages.  Admittedly I am an insufferably longwinded writer who can&#39;t find the delete key, but for whatever reason Google seems to think my explanation is helpful to people struggling with that topic.</p></div></blockquote><div>So indeed, Swift presents an apparently simple distinction with some very complex underlying implications, since an explanation of it all can fill 27 pages.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><p>While it is true that access control presents users the &quot;the full complexity of that choice directly&quot;, this is because the choice is not actually complex.  One keyword is visible to a file and the other to a scope.  I could not produce 27 pages on that topic.</p></div></blockquote><div>I am quite certain that we have filled many more than 27 pages on that topic here. If you want to collate it into a didactic format you can start with the delightful explanation of why ```private extension Foo { }``` works the way it does.<br></div></div><br></div></div>