> Le 1 déc. 2016 à 18:54, Gonçalo Alvarez Peixoto via swift-evolution 
> <[email protected]> a écrit :
> 
> @Aron, I did take a look at that document while developing the proposal. As 
> you stated, it's a little old, however the principles of access control and 
> their purpose remain pretty much the same. 
> 
> ".keep private details of a class hidden from the rest of the app
>  .keep interna details of a framework hidden from the client app"
> 
> Both these rules still get respected with the introduction of a new level of 
> access control. typeprivate would not allow for member access within any 
> other then the type itself.

typeprivate is confusing. Would we allow access to extension in the same file, 
in the same module, everywhere ? 

If a ‘typeprivate’ is accessible anywhere, it look more like a public var than 
a private one.

Maybe we should also introduce a typeinternal and typepublic modifier in such 
case to explicitly define who can access the var.

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

Reply via email to