News for hackers. Stuff that matters.
Re:Iterators? They still make these? by DjDarkman on Thursday June 17, 2010 @02:10PM (#1439827)
It did not make sense back then, it does not make sense now. Even the traditional for loop is superior to iterators.
Re:Iterators? They still make these? by RodgerTheGreat on Thursday June 17, 2010 @03:59PM (#1440173)
Can you implement a tree traversal (in-order, post-order, your pick) in a traditional for loop without abusing the syntax?
Re:Iterators? They still make these? by DjDarkman on Sunday June 20, 2010 @07:54PM (#1447457)
Sure you can, just list all your tree elements in an array, your iterator does that anyway. If done correctly it's 1 line extra code only.

And btw: let's not confuse implementation with syntax.

Re:Iterators? They still make these? by barrkel on Thursday June 17, 2010 @02:29PM (#1439903)
For loops are not a general replacement for iterators.
Re:Iterators? They still make these? by DjDarkman on Sunday June 20, 2010 @07:58PM (#1447462)
I didn't say we need to replace them, I said that we don't need them.