I realize that there’s no review needed, but I actually wanted to give a hearty
👏 to the authors and commenters of this proposal, because I genuinely think
we’ve reached something good in the result.
The selling point for me is this:
// This is allowed since the superclass is `open`.
class SubclassB : SubclassableParentClass {
// This is invalid because it overrides a method that is
// defined outside of the current module but is not `open'.
override func foo() { }
// This is allowed since the superclass's method is overridable.
// It does not need to be marked `open` because it is defined on
// an `internal` class.
override func bar() { }
}
This feels super-clean; it gives Library developers `open` for their APIs,
without confusing app developers, and still requires that sub-classing Library
developers think about `open`.
Good job, everyone!
Scott_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution