> 1) private to the file (Swift 2 semantics)
> 2) accessible only to the current type/scope and to extensions to that type 
> that are in the current file.

Imho the old model had the benefit that it made things like C++ "friend" 
superfluous, so I prefer 1) over 2).
It is simpler, and from a pragmatic standpoint, it is much more useful:
You can always put code into another file if you don't want it to access 
private stuff.

2) Solves the problem of encapsulation for playgrounds, but that could be done 
in other ways — there could be an #eof statement for playgrounds, and maybe 
Swift will even have improved namespaces in the future...
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to