<br><br><div class="gmail_quote">2010/3/31 Bert Freudenberg <span dir="ltr"><<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">On 31.03.2010, at 18:15, Igor Stasenko wrote:<br>
><br>
> On 31 March 2010 18:24, Bert Freudenberg <<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</a>> wrote:<br>
>> On 31.03.2010, at 17:23, Andreas Raab wrote:<br>
>>><br>
>>> On 3/31/2010 8:13 AM, Bert Freudenberg wrote:<br>
>>>> Show me a single place that would break in a real-world use-case.<br>
>>>><br>
>>>> In fact, #become: is rarely used in Squeak because of its inherent slowness caused by our direct-pointer object model. And those rare places I can think of would work just fine.<br>
>>><br>
>>> I think there is one, and only one, place where #become: is intrinsically required: Changing class shape.<br>
>><br>
>> Thought about that. Should be fine.<br>
>><br>
> Magma using a forwarding proxies to indicate a not-yet reified objects<br>
> in memory.<br>
><br>
> Suppose that you having multiple different objects, which referencing<br>
> such proxy.<br>
> Proxy is not reified before a first message sent to it and used as a<br>
> simple reference.<br>
> Nothing prevents you from having many other objects, which pointing to<br>
> that proxy without reifying a real object.<br>
> And now, think about that with introduction of immutability, some of<br>
> these objects is immutable. This means that it is now possible to have<br>
> an immutable object, which having a reference to forwarding proxy.<br>
> (even more than that, this is more than likely, because Magma will use<br>
> an immutability for own purposes, to track changes to objects which<br>
> belong to DB graph).<br>
> At some stage, your model sending a message to forwarding proxy, and<br>
> therefore magma needs to reify a real object<br>
> in memory and replace all references to proxy with it.<br>
> This is easy to implement by using a #becomeForward:, but if you<br>
> change the #becomeForward: semantics to not replace the references in<br>
> immutable objects, you will efficiently break this scheme , and it<br>
> can't be used reliably anymore.<br>
<br>
</div></div>Not at all. Of course you should not make an object immutable that you want to mutate later. That's the whole point really.<br>
<div class="im"><br></div></blockquote><div><br>With your "become logic" reference to proxy (like proxy in magma and glorp) will never materialized if immutability used for object modification tracking. <br>And it will break this frameworks (magma, glorp)<br>
<br><br></div></div>