[swift-evolution] Proposal: Add @requires_super attribute
marc at knaup.koeln
Wed Dec 16 16:16:39 CST 2015
Default behavior would require something like "unrequire" which seems odd.
Also this would break a lot of existing code and migration can't be done
On Wed, Dec 16, 2015 at 11:04 PM, Tino Heth via swift-evolution <
swift-evolution at swift.org> wrote:
> A huge +1 on this — I'd actually go one step further and propose to make
> it the default behavior:
> Calling super rarely hurts, and it would be easier to find a better name
> for the attribute ;-) (maybe "replaceable"…)
> Additionally, it is one step in the right direction for those who think
> "final" should be default (if there is any good reason to prefer final over
> requires_super, I haven't seen it yet).
> Instead of enforcing the call to super, it would be possible to
> automatically run the super implementation after (or before) the overriding
> method (unless it is explicitly called).
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution