> On Apr 7, 2017, at 10:06 AM, BJ Homer via swift-evolution 
> <[email protected]> wrote:
> 
>> It does not remove the scoped access control, it only relaxes it in 
>> extensions to types in the same file.
> 
> Many of the use cases for scoped access given during the review of SE-0159 
> specifically related to restricting access between extensions in the same 
> file. I don't personally use this, but it seems it is definitely used by some 
> developers. 

The most common thing is to have some stored properties that are private and 
include a handful of fileprivate (or higher) methods that operate on these 
properties in the type declaration.  All members that don’t need direct access 
to these properties are placed in extensions specifically to prevent the direct 
access to stored properties which they don’t need.  This minimizes the lines of 
code with access to such properties.

> 
> -BJ
> _______________________________________________
> swift-evolution mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-evolution

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to