On 30 October 2017 at 18:07, Adam Kemp <adam_k...@apple.com> wrote: > On Oct 30, 2017, at 10:57 AM, Mike Kluev <mike.kl...@gmail.com> wrote: > > > the new bucket would be "class and all of its extensions be them in the > same file or in different files”. > > > That’s not a new bucket. It is equivalent to either internal or public, > depending on whether you want to extend this beyond the module boundary. > The set of code you would have to audit is the same. >
it is different, see below: === file: Some.swift class Some { internal func foo() { bar() } classprivate func better() { good() } } === file: Some+Bar.swift extension Some { internal func bar() { foo() } classprivate func good() { better() } } === any other file (same module) class Other { func x() { let some = Some() some.foo() // ************** UNWANTED!!!!!! some.better() // error. ****** WANTED! } } I do not want to audit the class Other when I make a change to "foo" or "bar", which are essentially "private" and only made "internal" because of the language limitation in regards to "private" vs "multi-file class" issue. > What does marking a method as “specialprivate” (my made up name for this > new access level) tell clients about who can use it or how it can be used? > it tells them: "you can't use this, unless you are writing an extension to this class or making changes to this class itself" Mike
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution