<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On 31.03.2010, at 20:45, Denis Kudriashov wrote:</div><blockquote type="cite"><br><br><div class="gmail_quote">2010/3/31 Bert Freudenberg <span dir="ltr">&lt;<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</a>&gt;</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>
&gt;<br>
&gt; On 31 March 2010 18:24, Bert Freudenberg &lt;<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</a>&gt; wrote:<br>
&gt;&gt; On 31.03.2010, at 17:23, Andreas Raab wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; On 3/31/2010 8:13 AM, Bert Freudenberg wrote:<br>
&gt;&gt;&gt;&gt; Show me a single place that would break in a real-world use-case.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; 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>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I think there is one, and only one, place where #become: is intrinsically required: Changing class shape.<br>
&gt;&gt;<br>
&gt;&gt; Thought about that. Should be fine.<br>
&gt;&gt;<br>
&gt; Magma using a forwarding proxies to indicate a not-yet reified objects<br>
&gt; in memory.<br>
&gt;<br>
&gt; Suppose that you having multiple different objects, which referencing<br>
&gt; such proxy.<br>
&gt; Proxy is not reified before a first message sent to it and used as a<br>
&gt; simple reference.<br>
&gt; Nothing prevents you from having many other objects, which pointing to<br>
&gt; that proxy without reifying a real object.<br>
&gt; And now, think about that with introduction of immutability, some of<br>
&gt; these objects is immutable. This means that it is now possible to have<br>
&gt; an immutable object, which having a reference to forwarding proxy.<br>
&gt; (even more than that, this is more than likely, because Magma will use<br>
&gt; an immutability for own purposes, to track changes to objects which<br>
&gt; belong to DB graph).<br>
&gt; At some stage, your model sending a message to forwarding proxy, and<br>
&gt; therefore magma needs to reify a real object<br>
&gt; in memory and replace all references to proxy with it.<br>
&gt; This is easy to implement by using a #becomeForward:, but if you<br>
&gt; change the &nbsp;#becomeForward: semantics to not replace the references in<br>
&gt; immutable objects, you will efficiently break this scheme , and it<br>
&gt; 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></div></div></blockquote></div><div><br></div><div>You are talking about a write barrier.&nbsp;I'm talking about immutability.</div><div><br></div><div>As mentioned previously in this thread, these two are related, but not identical.</div><div><br></div><div>A write barrier might be more useful for current applications indeed. I simply wouldn't call that immutability.</div><div><br></div><div><div><blockquote type="cite"><div class="gmail_quote"><div>And it will break this frameworks (magma, glorp)<br></div></div></blockquote><div><br></div><div>Well if you make objects immutable you should be aware of what you are doing ;)&nbsp;</div><div><br></div><div>IMHO hard immutability would be a valid and consistent model. Whether it would actually be practical and useful in Squeak I'm not sure.&nbsp;There seems to be no &nbsp;compelling use case for it yet. OTOH, soft "almost-immutability" can be implemented in the image, so what would be the compelling reason to make this a VM feature, which almost certainly will come at a price?</div><div><br></div></div></div><div>
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Lucida Grande; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="font-family: Helvetica; "><span class="Apple-style-span" style="font-family: Helvetica; ">- Bert -</span></div></span></div><br></body></html>