[swift-evolution] Make access control private by default.
Jordan Rose
jordan_rose at apple.com
Mon Dec 7 13:07:19 CST 2015
> On Dec 7, 2015, at 10:48, Matthew Johnson via swift-evolution <swift-evolution at swift.org> wrote:
>
>
>> +1 to this from the point of view of correctness. But it's important to realize the drawback in the language "friendliness".
>> Other defaults that I think could be reconsidered along these lines: final by default for classes and final by default for methods.
>
> +1 to final on classes and class members being the default. I have wished this was the case ever since Swift was released. It is not uncommon to have a need for a reference type without a need for inheritance. Superclasses should be intentionally designed to be subclasses and the author required to opt-in to subclassing and member overrides where that is required by the design.
Let's start a separate thread for "final-by-default". It's definitely worth discussing. This thread can continue discussing "private-by-default".
Jordan
More information about the swift-evolution
mailing list