> On 26 Sep 2016, at 20:58, Ted F.A. van Gaalen via swift-evolution 
> <[email protected]> wrote:
> 
> Hello! Hope you are all OK! 
> 
> 
> As far as I can see without binoculars, the “fileprivate” acces modifier
> could be dropped, were it not for source compatibility reasons... 
>   
> Unless I am missing something: 

Yes you are missing something. I, for example have a few cases where it is 
useful. On the other hand, I was against the change in the meaning of private 
but, I have to concede that the new meaning is useful. 

As for dropping file private, why? You don’t have to use it if you don’t want 
to, so it’s not hurting you. On the other hand, I can use it when I deem it to 
be the right thing to do. 


> I don’t want the inner elements
> of a class (or struct ?) to be visible in outer scope!
> This is the default case in most OOP languages. 

The default in Java is package scope. I’m not sure what the default in C++ is, 
but it’s not private, ditto Javascript. So while that might not be most OOP 
languages, it probably covers most OOP programs.

While I think private by default has merit, we are where we are.


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

Reply via email to