> On Nov 28, 2017, at 1:35 PM, Matthew Johnson <matt...@anandabits.com> wrote:
>
>>> * the compiler doesn’t have to reason about an overload set which might
>>> improve build times, etc
>>
>> They’re effectively equivalent, because we still have to decide which subset
>> of the default arguments apply at a given call site by checking all
>> combinations of constraints.
>
> Interesting. Are there no advantages to the compiler that would be possible
> if an overload set was replaced with constrained default arguments?
>
Probably not. In general I’m wary of designing language features specifically
to speed up the type checker, since they make not have the intended effect or
even the opposite effect. We know the type checker implementation is not the
best possible implementation of a type checker — there is a lot we can improve
without changing the language.
Slava
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution