The number of files Is not the only or the biggest concern. Grouping related APIs and / or related implementations makes it much easier to keep everything consistent and easy to find. It&#39;s the same benefit as having multiple paragraphs of text in one file. Only with paragraphs this seems obvious, but for some reason causes a lot of debate when it comes to code.<br><br>--<br>Ilya Belenkiy<br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 14, 2015 at 3:16 PM joe &lt;<a href="mailto:joe@polka.cat">joe@polka.cat</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I&#39;ve only cursorily followed this thread, but with the introduction of the Swift Package Manager, I&#39;m guessing it will have a role to play in reducing the number of files one needs to be concerned with at any one time. If one has such an overwhelming number of files, it&#39;s probably likely that they could be split up into separate packages/modules. I&#39;m not sure how much that has been considered in regards to worry of ending up with too many separate files.<br>
<br>
And even assuming one runs into cases where there are loads of .swift files, at least it&#39;s still basically half of what there would be in Objective-C :)<br>
<br>
&gt; On Dec 14, 2015, at 1:42 PM, Ilya Belenkiy via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br>
&gt;<br>
&gt; 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>
&gt;<br>
&gt; --<br>
&gt; Ilya Belenkiy<br>
&gt;<br>
&gt; 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>
&gt; (I&#39;m reading the upstream discussion but I&#39;ll reply here.)<br>
&gt;<br>
&gt; 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.<br>
&gt;<br>
&gt; 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.<br>
&gt;<br>
&gt; 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.<br>
&gt;<br>
&gt; 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>
&gt;<br>
&gt;&gt; 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:<br>
&gt;&gt;<br>
&gt;&gt; 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.<br>
&gt;&gt;<br>
&gt;&gt; 2) accessibility by file structure may cause some really short files.<br>
&gt;&gt;<br>
&gt;&gt; 3) It&#39;s impossible to group related classes in one file but still hide implementation details inside each class<br>
&gt;&gt;<br>
&gt;&gt; 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.<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Ilya Belenkiy<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; swift-evolution mailing list<br>
&gt;&gt; <a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
&gt;&gt; <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; swift-evolution mailing list<br>
&gt; <a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
&gt; <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
&gt;  _______________________________________________<br>
&gt; swift-evolution mailing list<br>
&gt; <a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
&gt; <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
<br>
</blockquote></div>