[swift-evolution] Final by default for classes and methods
2th at gmx.de
Tue Dec 22 14:20:43 CST 2015
> Whether the language has final-by-default/sealed-by-default doesn't really affect this in any way. I guarantee you that once Apple starts putting Swift code in their frameworks, every single framework class Apple releases is going to make an explicit decision about being final/sealed vs inheritable, and the language defaults won't affect that one bit.
You're quite right, but imho the whole issue is bigger than a few characters that have to be typed to get the desired inheritance characteristic: That would not drive discussion that long.
It's also about the philosophy that backs the choice, it is freedom vs. safety, and any default value is a statement in favor of one of the extreme positions — and it is a little push for anyone designing a library, including those who work at Apple.
The idea of encouraging an explicit choice has value; I think a proposal to have no default at all wouldn't have created such a big debate...
More information about the swift-evolution