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

Dave Abrahams dabrahams at apple.com
Wed Apr 27 15:29:30 CDT 2016


on Wed Apr 27 2016, Matthew Johnson <swift-evolution at swift.org> wrote:

> Sent from my iPad
>
> On Apr 27, 2016, at 3:08 PM, Jérôme ALVES via swift-evolution
> <swift-evolution at swift.org> wrote:
>
>     What if... 
>
>     FooBar.framework defines :
>
>     public protocol A {
>     func foo()
>     }
>     public type B: A {
>     public func foo () { 
>     … implementation … 
>     }
>     }
>
>     Other module defines :
>     import FooBar
>
>     extension A {
>     func foo() { .. default implementation … }
>     }
>
> This is a good example. More generally, we should be sure that any change we
> make here does not interfere with retroactive modeling.

+1!

-- 
Dave



More information about the swift-evolution mailing list