<div dir="ltr">Ah. Thanks. I&#39;ve read through that proposal before but totally forgot that change.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 1, 2016 at 10:01 PM, Dmitri Gribenko <span dir="ltr">&lt;<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Mar 1, 2016 at 6:55 PM, Trent Nadeau &lt;<a href="mailto:tanadeau@gmail.com">tanadeau@gmail.com</a>&gt; wrote:<br>
&gt; Why is the protocol for iterators called IteratorProtocol instead of<br>
&gt; Iterator or Iterable? If that is/was discussed elsewhere, I apologize, but I<br>
&gt; don&#39;t remember seeing that particular name before. Is that new to this<br>
&gt; proposal?<br>
<br>
</span>I&#39;m using the new names introduced by SE-0006<br>
<a href="https://github.com/apple/swift-evolution/blob/master/proposals/0006-apply-api-guidelines-to-the-standard-library.md" rel="noreferrer" target="_blank">https://github.com/apple/swift-evolution/blob/master/proposals/0006-apply-api-guidelines-to-the-standard-library.md</a><br>
<br>
The protocol is not called Iterator to disambiguate it with the<br>
Iterator associated type in Sequence from the protocol:<br>
<br>
protocol Sequence {<br>
  associatedtype Iterator : IteratorProtocol<br>
}<br>
<br>
It is not called Iterable because that would have the wrong meaning<br>
(Sequence is iterable, the iterator iterates over its elements).<br>
<span class="HOEnZb"><font color="#888888"><br>
Dmitri<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
--<br>
main(i,j){for(i=2;;i++){for(j=2;j&lt;i;j++){if(!(i%j)){j=0;break;}}if<br>
(j){printf(&quot;%d\n&quot;,i);}}} /*Dmitri Gribenko &lt;<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>&gt;*/<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Trent Nadeau</div>
</div>