Catch-all proposal based on proxies

David-Sarah Hopwood david-sarah at
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(;

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

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

David-Sarah Hopwood  ⚥

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 292 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the es-discuss mailing list