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.
I'd say the usability aspect alone is reason enough to do that change.
/ Johan Sundström (utan sälskap)
Previous text:
2003-09-04 15:19: Subject: Iterator interface
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