i gathered that, i meant to ask what is the effect of not being able to do that?
Your simulated class can't use the feature of weak references to indices and/or values that real mappings have.
also, could i add: this_program set_weak_flag(); { set_weak_flag(data, 1); return this; }
Something like that is probably the best you can do, yes. But I think your function should take a bitfield argument like the real set_weak_flag so that users can set indices and values weak separately, and remove the weak bits again. There's also a get_weak_flag to query the current settings.
but does that mean that when i have the statement: foo += bar; where foo and bar are of some arbitrary class that has `+= i have no control over wether `+= is even used? ie, pike could be turning this into foo=foo+bar; if it thinks there may be sideeffects?
Yes, exactly. The identifier `+= is a bit misleading since it has no real connection with the += operator.