[swift-dev] A type-checking performance case study
Dmitri Gribenko
gribozavr at gmail.com
Fri Apr 8 15:18:22 CDT 2016
On Fri, Apr 8, 2016 at 11:47 AM, John McCall via swift-dev
<swift-dev at swift.org> wrote:
> I strongly recommend that we pursue declaration hiding as a language change.
I completely agree with John. Not having this rule is not just a
performance problem, it also leaks into the user model. For example:
- If you have a lazy collection, you can still call the eager `map` if
you provide matching type context.
- If a protocol extension method that was intended to be a default
implementation does not get selected as the implementation, then both
are visible on the type. This causes ambiguities when chaining.
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
More information about the swift-dev
mailing list