> On Nov 28, 2017, at 4:11 PM, Slava Pestov <spes...@apple.com> wrote: > > > >> On Nov 28, 2017, at 1:35 PM, Matthew Johnson <matt...@anandabits.com >> <mailto: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.
That isn’t the motivation here. I thought it might be an incidental benefit. If it isn’t the motivating use case still stands. Of course it may or may not be sufficient to justify the feature. :) > > Slava
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution