2010/1/13 Eliot Miranda <eliot.miranda@gmail.com>:
1.
[ Agreed, and snipped. ]
2. Yes, but it doesn't cost as much as you think. Â If one is using immutability to mark objects dirty then the exception only gets delivered once for that object. Â Once the object is dirty it can remain mutable until a batch of objects are updated, etc.
Right. But we should not fool ourselves and actually play nicely even for the worst case here, when application, for some stupid reason, tries to modify every object it can put its hands on ;) Also, one subtle detail about following: old := foo. foo := newValue. old == foo ifFalse: [ Magma markAsDirty: self ] that if old == foo, object will not be marked dirty and write will be performed. But in case of NoModificationError, object will be marked dirty, because you don't know what actual value were attempted to be written, and what sits on that place now. Maybe VM should play nice and just ignore cases when write attempt does not changing anything , because old slot value is same as new one.
Martin could you say something about the dispatch schemes Gemstone uses and what the performance issues have been in practice? Â (TIA)
best Eliot
-- Best regards, Igor Stasenko AKA sig.