[swift-evolution] Make access control private by default.
Jean-Daniel Dupas
mailing at xenonium.com
Mon May 23 16:45:21 CDT 2016
> Le 23 mai 2016 à 23:21, Knut Lorenzen via swift-evolution <swift-evolution at swift.org> a écrit :
>
>
>> On 19 May 2016, at 19:18, John McCall <rjmccall at apple.com> wrote:
>>
>> That is not at all true. The dynamic OOP languages do not, as a rule, have any access control at all. Java and C# default to package access, which is analogous to internal. C++ is, as always, complicated and different.
>
> Class members are private by default in both Java and C#. As are ivars and selectors in Objective-C (the latter having to be redeclared in the header file for module-wide access). Swift definitely gives greater default scope to class members in comparison to other OOP languages.
On Java, they are package-private, not private by default, which is closer to module visibility of swift than private.
>
> Knut
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
More information about the swift-evolution
mailing list