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

I agree wholeheartedly with BUU. I'm rewriting Tree::Simple right now and I completely removed the visitor interface for exactly that reason. I'll give you an iterator over me and my children and you can implement the visitor interface if it's that important to you.

My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
  • Comment on Re^2: Iterator as a Class or Object Method

Replies are listed 'Best First'.
Re^3: Iterator as a Class or Object Method
by Anonymous Monk on Oct 03, 2005 at 14:56 UTC
    Care to explain? Seems like you are against "map", "grep", and "foreach" (i.e. pass a block to a higher order function). Maybe I'm misunderstanding what a "visitor" is?