<div style="white-space:pre-wrap">There are a lot of unreasonable assumptions here. That&#39;s all I have to say in response.<br><br>--<br>Ilya Belenkiy</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Dec 15, 2015 at 11:35 AM Colin Cornaby &lt;<a href="mailto:colin.cornaby@mac.com">colin.cornaby@mac.com</a>&gt; wrote:<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"><div>I guess where I get skeptical is the example case. In this example, a module that should otherwise be simple but is made complicated by having too many source files in Swift is really a module that should be simple, but has been made complicated by too many custom types. If we’re talking about a simple module that has been overcomplicated by too many types (Swift scoping aside), we’re talking about a module that likely has significant architectural problems. That’s why I asked if there were any examples. I was wondering if there were any cases where a project’s design was otherwise sound, but maintainability was compromised by a lack of fine grain scoping in Swift. What’s been talked about so far seems to really be Swift source that is suffering from design issues or overbuilding, and instead of fixing those design issues that’s leading to a large number of source files, we’re talking about paving over those design issues with new language constraints.</div><div><br></div><div>I don’t know where the Swift team falls in having Swift as a language that supports questionable development practices. But to me, I’m still just not convinced the work to change this would be justified by any real gain in good development practices.</div></div><div style="word-wrap:break-word"><br><div><blockquote type="cite"><div>On Dec 15, 2015, at 4:10 AM, Ilya Belenkiy &lt;<a href="mailto:ilya.belenkiy@gmail.com" target="_blank">ilya.belenkiy@gmail.com</a>&gt; wrote:</div><br><div><div dir="ltr">This is a matter of opinion. I think that the proposal is very much in line with Swift&#39;s emphasis on strong types and protocols and adds clarity about where an API can be used.<div><br></div><div>--</div><div>Ilya Belenkiy</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 14, 2015 at 4:11 PM Colin Cornaby &lt;<a href="mailto:colin.cornaby@mac.com" target="_blank">colin.cornaby@mac.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>I don&#39;t think this analogy follows. Books have division lines of pages or chapters that compartmentalize information. In the same way, development projects traditionally have a separation of concerns that are organized using different source code files. I don&#39;t know if a &quot;gazillion&quot; accurately captures the number of files required to separate concerns. On the other hand, I&#39;m also not sure if Swift should try to enforce good development practices as policy (but I like the practice it&#39;s trying to support here.)</div><div><br></div><div>I&#39;m just watching this from the sidelines, but I haven&#39;t seen a compelling example case anywhere in the discussion that would lead to just an unmaintanable number of files. Even for multiple teams all working on the same source... separation of files seems like the cleanest solution.</div><div><br></div><div>As others have mentioned, iOS and Mac development (as well as open source Swift) seems to be going in the direction of a single application or project containing multiple modules. Mac has been doing that with great success for a long time. Given that&#39;s the direction things are going, private as it exists now even seems a little heavy for a lot of uses. It&#39;s completely realistic the projects are going to start separating concerns over module boundaries and not just source file boundaries. This proposal just seems to be going the opposite way that Swift and Apple platform development is going.</div><div><br></div><div>Files are easy to understand, and they&#39;re lightweight, and I just haven&#39;t been convinced that files with small amount of source are even a bad thing, nor have I seen Swift projects out in the wild that have too many short Swift source files that is a result of language restrictions. Do you have any examples of projects out in the community?</div></div><div><div><br>On Dec 14, 2015, at 11:42 AM, Ilya Belenkiy &lt;<a href="mailto:ilya.belenkiy@gmail.com" target="_blank">ilya.belenkiy@gmail.com</a>&gt; wrote:<br><br></div></div><div><div><blockquote type="cite"><div><div style="white-space:pre-wrap">Please take a look at the other posts today. I addressed this concern earlier. In one sentence, just like you wouldn&#39;t want to put every paragraph of a book or every section of an article in an encyclopedia in a separate file, you wouldn&#39;t want to end up with a gazillion files just to ensure that implementation details of an API stay hidden in a way that is enforced by the compiler.<br><br>--<br>Ilya Belenkiy</div><br></div></blockquote></div></div><div><div><blockquote type="cite"><div><div class="gmail_quote"><div dir="ltr">On Mon, Dec 14, 2015 at 2:19 PM Colin Cornaby via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br></div></div></div></blockquote></div></div><div><div><blockquote type="cite"><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>(I&#39;m reading the upstream discussion but I&#39;ll reply here.)</div><div><br></div><div>I don&#39;t know if I really like the pattern this is trying to support. I like that Swift makes it cleaner to include multiple types in a single Swift file. But I feel like this proposal is trying to take things too far the other way. Types that should should only see each other from a non &quot;friends&quot; role should be in separate files.</div><div><br></div><div>What&#39;s proposed doesn&#39;t really harm someone who likes the &quot;multiple file&quot; style directly, but I don&#39;t want to see projects where everything gets jammed into one file. I think keeping the scope of private (with no new keywords) to the same file encourages good coding practices.</div><div><br></div><div>I&#39;ve really liked the balance Swift strikes in this case. I feel like this discussion is going to come down to opinion, but projects that I&#39;ve worked in that have tried to over compact have always run into issues. I don&#39;t know if it&#39;s the role of the language to push an ideology either way, but personally I like the direction Swift is pushing. Files make for good scope boundaries.</div><div><br>On Dec 05, 2015, at 08:40 PM, Ilya via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br><br></div><div><blockquote type="cite"><div><div dir="ltr">I think the it would help a great deal to have an access level modifier that is really private and visible only inside the class itself. Right now, the only way to hide implementation details for a class is to hide the class code in a separate file, which is very inconvenient for several reasons:<div><br></div><div>1) the meaning of the code changes depending on which file the class is in. It&#39;s very easy to accidentally expose class internal details and then call class elements that are meant to be used only inside the class. Having a keyword for class internals will allow the compiler to ensure that only the public API for the class is used from the outside world. The user can check types on his own, but it&#39;s better that the compiler does it automatically. Similarly, the user can check that only the proper APIs are called, but it&#39;s better that the compiler does it automatically.</div><div><br></div><div>2) accessibility by file structure may cause some really short files. </div><div><br></div><div>3) It&#39;s impossible to group related classes in one file but still hide implementation details inside each class</div><div><br></div><div>I think that it the best solution is to make private keyword do what it states -- keep the class element private to the class. But if it&#39;s really important to have a separate keyword for backward compatibility, it would be the next best thing.</div><div><br></div><div>--</div><div>Ilya Belenkiy</div></div></div></blockquote></div></div></blockquote></div></div></blockquote></div></div><div><div><blockquote type="cite"><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><blockquote type="cite"><div><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=OFgvmg1J6naJevMotmPmRgzA4p1gcL5s2O89Xj3c0DTNHsqJk65QFT5HLCVezTEprPcloGEz-2Br9eX025xVr0O5djiNmvDtObklmVeX-2B1GNTS-2Fnw4G-2Firawot5vOYNnJx8VglVzjCO6FF-2FWlpJIhHkHCuoca6ZlHSegHCts96VVjE5sXIc07iEl3EfeNiUlweed2WOO2xFh-2BwEhkqg0XL3CwYKxPpCifcnwHp4APtgA0-3D" alt="" width="1" height="1" border="0" style="min-height:1px;width:1px;border-width:0;padding:0;margin:0"></div></blockquote></div></div></blockquote></div></div></blockquote></div></div><div><div><blockquote type="cite"><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><blockquote type="cite"><div><div><span>_______________________________________________<br>swift-evolution mailing list<br><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></span></div></div></blockquote></div></div></blockquote></div></div></blockquote></div></div><div><div><blockquote type="cite"><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><blockquote type="cite"><div></div></blockquote></div></div><div><div><blockquote type="cite"><div><br></div></blockquote></div><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=JoVvr1nwtkf-2FcycRIsh0Ekp6hrdbCH7iUjVG-2FENQSue2nvVSO-2F4L-2BUCQGbPHKghVUHW0pZgfgNYXmZTSz-2BC2vyXP6nhyBw7usZnDdbIvoPVlyVwjyfcAbDDklTZofD5QfRFvZxaKbKvzHw4c50WGtaag0-2F8oF0qikJFMmdTF8-2FDORfoqqkWlntN3UMyY5xS8fWk4tgeEy4pJwmyoZC1GfW7BlpnhXwJNYTexCegg1Xs-3D" alt="" width="1" height="1" border="0" style="min-height:1px;width:1px;border-width:0;padding:0;margin:0"></div></blockquote></div></div></blockquote></div></div><div><div><blockquote type="cite"><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 0.8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<br> swift-evolution mailing list<br> <a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br> <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></blockquote></div></div></blockquote></div></div></blockquote></div>
</div></blockquote></div><br></div></blockquote></div>