[swift-evolution] access control

Carlos Rodríguez Domínguez carlos at everywaretech.es
Fri Jan 29 06:04:14 CST 2016


I agree with some contributors of this thread in the sense that current “private” modifier is really confusing for newcomers. I think one of the objectives of Swift is to try to attract new developers, and most developers come from Java-based platforms. Therefore, using the same modifier name as in Java, but to refer to different access control semantics, could mislead its use. In my opinion, “private” should have the same semantics as some people are proposing for the new “local” modifier. On the other hand, the new “local” modifier should be a replacement of the current “private” modifier, in order to support a similar approach to “friend classes” in c++ (as it really happens right now with that access control).



More information about the swift-evolution mailing list