[swift-evolution] Final by default for classes and methods

Andrey Tarantsov andrey at tarantsov.com
Wed Dec 23 22:09:24 CST 2015


> Isn't this proposal solving a problem that in practice doesn't exist or isn't common enough to be worth a language level fix?

Well I have a TextExpander macro that inserts "// override point" when I type ;overp. Been marking all overridable methods this way for years. I think it's an indication that the problem is worth solving.

> I'm trying to find an example of a common problem - in any language - that would benefit by having final/sealed by default.

Understanding the code and reasoning about the class is easier when you know the exact customization points.

I do agree that this won't really prevent many actual bugs.

A.



More information about the swift-evolution mailing list