<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 30, 2017, at 2:23 PM, Mike Kluev &lt;<a href="mailto:mike.kluev@gmail.com" class="">mike.kluev@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">On 30 October 2017 at 19:49, Adam Kemp <span dir="ltr" class="">&lt;<a href="mailto:adam_kemp@apple.com" target="_blank" class="">adam_kemp@apple.com</a>&gt;</span> wrote:<br class=""><div class="gmail_extra"><div class="gmail_quote"><div class="">&nbsp;</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><div class="">How do you know there’s not an extension in this file without looking? If you don’t know then you have to check. That puts it in the same bucket as internal or public. The set of files you have to search through for usages is the same.</div><br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">I'd just search for "extension SomeClass", Xcode search result window will list all files that have it.</div><div class="">or I will list all the users of "foo" if that's the one I am changing.</div></div></div></div></div></blockquote><div><br class=""></div><div>When you do that search, which files do you include in the search? That’s the key.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></div><div class="">the good guideline from Obj-C was (and still is) using "SomeClass+ExtensionName" file naming convention that also helps.</div></div></div></div></div></blockquote><div><br class=""></div><div>That’s not sufficient because there’s nothing in the language that would force people to follow this convention, and you can have extensions in any file for any class.</div><div><br class=""></div><div>The point I’m trying to make, again, is that the set of files that you would have to search through is the same. Once you know the set of files that need to be searched you can just search for actual usages of the API you’re changing (the method or property or whatever). The important thing is to know which files need to be searched in the first place. That’s what access level really controls.</div><div><br class=""></div><div>Each access level implies a unique set of files that have to be searched. Public = all files in all clients. Internal = all files in this module. File private = just one file. Private = just one part of one file.</div><div><br class=""></div><div>“specialprivate", by allowing any extension to access the API, would imply the same set of files as either internal or public. You can’t know ahead of time whether some random file in your module might make an extension that access that API so you have to search all files within that module. You would perform the search exactly the same way. It doesn’t help you as a library maintainer. You’re not going to save work by making something “specialprivate” instead of internal. Worst case is you actually convince yourself that you don’t have to search the whole module, and then you break something because of that misunderstanding. That’s why internal is better. It avoids obfuscating the actual implications of that access level.</div></div></body></html>