[swift-evolution] [Pitch] Requiring proactive overrides for default protocol implementations.

Erica Sadun erica at ericasadun.com
Thu Apr 28 18:14:25 CDT 2016


On Apr 28, 2016, at 5:09 PM, Howard Lovatt <howard.lovatt at gmail.com> wrote:
> 
> It is a good idea to explicitly document the behaviour that this requirement for override is a compile time check only and does not mean that already compiled code has to be recompiled to allow a protocol to be retroactively fitted to an already compiled type.
> 

At this time, default protocol implementations do not exist.

At compilation time, either a protocol default exists or it does not. The goal of this proposal is to increase safety through syntax. 

What is the current behavior where a subclass is pre-compiled and the superclass then changes through an extension to implement a member that the already compiled subclass had implemented but not as an override?

-- E




More information about the swift-evolution mailing list