in reply to Re^4: An object replacing itself
in thread An object replacing itself
Now, about your de rigeur argument ... that's how you got into trouble in the first place. You took a solution from a Great in his field and said "If XYZ says it works, then it must be the only way." Just because 90% of a group do things in a certain way doesn't mean it's the right way. Granted, it's the way you should probably check out first, if only to know what it is. But, you should understand the solution, why the solution works the way it does, what problem(s) does it solve, and when is it not applicable.
An iterator isn't always the right way to iterate through the items in a set. There are times when it's appropriate to use other concepts. However, I've never run into one. YMMV
------
We are the carpenters and bricklayers of the Information Age.
Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose
I shouldn't have to say this, but any code, unless otherwise stated, is untested
|
|---|