On Sun, Apr 24, 2016 at 1:34 PM, David Hart via swift-evolution <swift-evolution@swift.org> wrote: > Currently, associated type declarations can only express simple inheritance > constraints and not the more sophisticated constraints available to generic > types with the where expression. Some designs, including many in the > Standard Library, require more powerful constraints for associated types to > be truly elegant. For example, the SequenceType protocol can be declared as > follows:
I completely support this. This feature will unblock many improvements in the standard library. Currently users of some protocols have to carry extra constraints in their own type signatures, but we should be able to hoist these constraints into the protocol definiton. 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 <griboz...@gmail.com>*/ _______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution