[swift-evolution] [Review] SE-0117: Default classes to be non-subclassable publicly

Tino Heth 2th at gmx.de
Sun Jul 10 00:14:39 CDT 2016

> Also "subclassable class" sounds a bit redundant. In other words, I think subclassable implies it is a class.
That's a good point:
There is no inherent reason that you can't inherit from a struct, and that might be possible in a future version of swift.
"subclassable struct MyValue" doesn't read that bad, but depending on how much emphasis is given to the difference of classes and structs, this could be irritating.

But imho the naming is bad anyways:
Both keywords are completely irrelevant for "regular" developers, yet they are directly linked to fundamental concepts of the language.
Removing "overridable" from a method has not the expected effect (you still can override it), and the same is true for subclassable.
Something abstract (like "virtual") would be a little less confusing.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160710/8668eeda/attachment.html>

More information about the swift-evolution mailing list