Mike Samuel wrote:
> Proxy based iterators work well with existing loop constructs though
>     while ('next' in iterator) doSomething(iterator.next);

I don't understand what advantage this has over
      while (iterator.hasNext()) doSomething(iterator.next());

If next() has side-effects (moving to the next element), it shouldn't
be a getter.

-- 
David-Sarah Hopwood  ⚥  http://davidsarah.livejournal.com

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to