[swift-evolution] [Completing Generics] Completing protocol extension diagnostics
Goffredo Marocchi
panajev at gmail.com
Fri Mar 4 04:31:22 CST 2016
Sorry, I understand and appreciate your pragmatism. Right now it feels very much like a fight to the ideological death between POP and OOP and it may get really bad results this way.
Sent from my iPhone
On 4 Mar 2016, at 08:58, Brent Royal-Gordon <brent at architechies.com> wrote:
>> Brent, why is dynamic dispatching for protocol extension default implementations wrong in your mind? Wouldn't you agree that when static dispatching introduces such a side effect that it should not be automatically applied and perhaps a keyword should be added if you really wanted static dispatching nonetheless?
>>
>> I think that code execution should not be affected by type casting, it feels like a very confusing part of the language.
>
> I don't think dynamic dispatch is wrong; I think it's a large and technically challenging change. So in the spirit of incrementalism, I was trying to make cautious proposals which kept existing semantics intact but made them clearer, in preparation for perhaps eventually introducing dynamic dispatch. (Basically, I suggested that non-overridable protocol extension members should be marked `final` and it should be illegal to shadow them.)
>
> But the feedback I got indicated that most people wanted a more aggressive proposal which introduced dynamic dispatch immediately. That's much harder to propose because it touches on all sorts of runtime implementation details I know nothing about, so I didn't try to draft a proposal.
>
> (You are, perhaps inadvertently, currently demonstrating exactly what happened in those previous threads!)
>
> --
> Brent Royal-Gordon
> Architechies
>
More information about the swift-evolution
mailing list