You will be able to tell the difference if o->t is a couple of megabytes and you're adding lots of small strings to it, I promise.
OTOH there seems to be no problem in defining a lfun::`+() that acts destructively (returns `this')...
Please don't do that. It doesn't follow the semantics of the + operator, and so will seriously confuse anyone who is using your class. Just name your destructive function something like "append" or "add" instead.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-04-17 22:46: Subject: lfun::`+=()
Duh. When the object o has no references outside the stack, I don't care whether o+="foo" is destructive or not; I can't tell the difference anyway.
OTOH there seems to be no problem in defining a lfun::`+() that acts destructively (returns `this')...
/ rjb