> On Mar 27, 2016, at 7:21 AM, Maximilian Hünenberger <[email protected]> > wrote: > > I like the idea of protected (against extensions). > However this raises the question whether extensions are also extensions of > scope. > > > Can "private(scope)" properties/functions be accessed from extensions? I think the idea is for private-scope / local to not be seen from extensions in other files. I am not sure how that works for same file extensions. > > In your case: > Is "protected" exactly like local? So it doesn't hide properties from > extensions within the file?
Yes. just like local. > By making "private" scope based it is less private than "protected" which > doesn't feel right to me. (Assuming extensions extend scope) > > In my opinion "protected" should protect against other scopes/classes. > Leaving "private" file based. In essence there are two ideas floating around in my head: 1) give the new local / private-scope a unique name like 'secret' or 'protected' and keep everything else the same. 2) redefine this new local / private-scope as just 'private', private-file becomes 'internal' , we find a new name for private-module like 'external' and we keep public as is. I'm am now leaning towards number 2. Public External (default) Internal Private
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
