[swift-evolution] Require use of override keyword to override dynamically dispatched methods defined in a protocol with a default implementation

Thorsten Seitz tseitz42 at icloud.com
Wed Jan 6 00:45:39 CST 2016


> Am 06.01.2016 um 06:23 schrieb Xiaodi Wu via swift-evolution <swift-evolution at swift.org>:
> 
> It would remain very much possible to formalize an existing pattern because, in the case of your example (unless I'm misunderstanding?), you are not also providing a default implementation of the "min" and "max" getters, and the IntXX structs would have nothing to override. Indeed, you'd hardly be formalizing an existing pattern if you had to supply de novo implementations!

The pattern might exist for some existing classes or structs but it might still be useful for new classes or even for some existing ones to provide a default implementation.

-Thorsten 


More information about the swift-evolution mailing list