On Sat, Jan 29, 2005 at 06:45:00PM +0100, Martin Stjernholm, Roxen IS @ Pike developers forum wrote:
what will be the effect of this when using the class instead of a real mapping?
You can't set weak flags on it using set_weak_flag.
i gathered that, i meant to ask what is the effect of not being able to do that?
also, could i add: this_program set_weak_flag(); { set_weak_flag(data, 1); return this; }
`+= was documented as being used for a destructive append. since i want to emulate mappings, += should not be destructive.
It's only used when it's possible to be destructive without observable side-effects. Real mappings can do the same optimization.
oh, i was not aware of that,
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?
greetings, martin.