Catch-all proposal based on proxies
david-sarah at jacaranda.org
Thu Dec 10 18:14:38 PST 2009
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
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 292 bytes
Desc: OpenPGP digital signature
More information about the es-discuss