[swift-evolution] Final by default for classes and methods
matthew at anandabits.com
Mon Dec 21 14:23:10 CST 2015
Sent from my iPhone
> On Dec 21, 2015, at 2:03 PM, Tino Heth via swift-evolution <swift-evolution at swift.org> wrote:
>> - 'private' and 'internal' methods are not exposed outside of a library, so you can't call them, much less override them. Similar for 'private' and 'internal' classes: you cannot subclass them.
> really important point — and imho one of the best arguments not to make final the default:
> It IS already the default (practically), so all points regarding own frameworks used by other parties become much less relevant.
This is not true at all. You are making the case that 'sealed' is "practically" the default, not 'final'.
I can see why you view it this way, but access control and inheritability are orthogonal. A framework class that needs to be publicly visible does not necessarily need to be inheritable and there are compelling reasons why that should not be allowed by default.
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution