PROPOSAL: Enhanced for each loop iteration control
Joseph D. Darcy
Joe.Darcy at Sun.COM
Wed Apr 22 21:08:15 PDT 2009
Reinier Zwitserloot wrote:
> If the proposal was just about making the iterator available, I'd
> agree with you, but the proposal adds methods like .first(), which are
> /very/ useful indeed. It's right up there with ARM, and easily beats
> string switching, in how applicable that would be.
A library to implement the utility wrapper around an Iterator could be
added without the language change.
> Adding a .join() method to String or List (depending on taste) would
> solve over half of the use-cases for the extended forloop, though.
Adding one method to string is preferable to a language change!
More information about the coin-dev