in reply to Re^3: Iterator as a Class or Object Method
in thread Iterator as a Class or Object Method

Re: Are you looking at XML processing the right way? (merge) says it far better than I could.
  • Comment on Re^4: Iterator as a Class or Object Method

Replies are listed 'Best First'.
Re^5: Iterator as a Class or Object Method
by Anonymous Monk on Oct 03, 2005 at 21:45 UTC
Re^5: Iterator as a Class or Object Method
by NetWallah (Canon) on Oct 04, 2005 at 00:05 UTC
    That was an excellent descussion by the gods (BUU++).

    Point conceded.

         "Man cannot live by bread alone...
             He'd better have some goat cheese and wine to go with it!"

Re^5: Iterator as a Class or Object Method
by adrianh (Chancellor) on Oct 04, 2005 at 12:12 UTC
    Re: Are you looking at XML processing the right way? (merge) says it far better than I could.

    That's tye (quite correctly) saying that callbacks are less flexible than iterators. That's not an argument for throwing the former away. C style for loops are more flexible that Perl style foreach loops - but I wouldn't want to do without the latter :-)

    If your iterating over everything in a Feed object 30 times in your code why not abstract that loop out?

    Iterators and callbacks are both useful interfaces. I wouldn't want to do without either.