On Mon, Mar 14, 2016 at 4:42 PM, Haravikk via swift-evolution
<[email protected]> wrote:
> There are quite a lot of generator implementations that also implement 
> SequenceType (since it’s as simple as returning self). Indeed, the 
> AnyGenerator type conforms to SequenceType, allowing any generator to be 
> wrapped as a sequence, though I imagine this comes with some overhead. So it 
> got me thinking, why doesn’t GeneratorType just require conformance to 
> SequenceType?

Because of compiler bugs.  We have the default implementation in the
library already, we just can't declare the conformance.

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 <[email protected]>*/
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to