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

Xiaodi Wu xiaodi.wu at gmail.com
Thu Apr 28 18:45:41 CDT 2016


Why allow both `override` and `required`? I understand you mean it to
indicate that you're overriding a requirement, but does that provide any
additional safety? Both say "I intend to name something the same as
something else."

In addition, the juxtaposition of both keywords can be misunderstood.
Specifically: required suggests that something not otherwise there must be
there. Override suggests that there's already something there. The act of
overriding can never itself be "required." It's could be thought of as an
oxymoron to have both, no?

On Thu, Apr 28, 2016 at 6:20 PM, Erica Sadun via swift-evolution <
swift-evolution at swift.org> wrote:

>
> On Friday, 29 April 2016, Matthew Johnson via swift-evolution <
> swift-evolution at swift.org> wrote:
>
>> Does that mean the conformance declaration will be accepted by the
>> compiler under your proposal?  I would really like to see this called out
>> explicitly in the proposal.
>>
>
> I'm making live updates at the gist in response to on-list discussions:
>
> https://gist.github.com/erica/fc66e6f6335750d737e5512797e8284a
>
> If you have specific suggestions for modifications, I'll be happy to
> evaluate for incorporation.
>
> -- E
>
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160428/4a6695f4/attachment.html>


More information about the swift-evolution mailing list