On Mon, Sep 8, 2014 at 2:21 PM, Stephen R. van den Berg srb@cuci.nl wrote:
Arne Goedeke wrote:
a += b is a shorthand for a = a + b, so the refs==1 check is the only correct condition for when to use the `+= lfun. The `+= lfun therefore is _not_ operator overloading for +=, but rather an optimization for when a has only one reference.
Yes, that seems to describe what happens. That is not what someone would expect that implements an `+= lfun on an object.
Then they should have read the docs: http://pike.lysator.liu.se/generated/manual/modref/ex/lfun_3A_3A/_backtick_a...
Tobi