That's a bit blunt and it can never be turned off, but yes it's much simpler.
There's also the case of keeping compatibility with pike code that use iterators explicitly through `+=. I.e. we'd either have to add an alias `+= for "step" in new iterators, or automatically rewrite
x->`+= (y);
to
if (x->`+=) x->`+= (y); else x->step (y);
in pike code that uses #pike 7.4. Bläää.. :(
What I'd really like to do is to scrap the "rewriting" of a += b to a = a + b. Many things would be much simpler if the operator += used the lfun `+= regardless of the number of references.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-04 14:53: Subject: Iterator interface
I prefer variant 2. Regarding the compat problem, I think using `+=() as fallback if step() doesn't exist is a more viable solution.
/ Henrik Grubbström (Lysator)