<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><span style="font-family:arial,sans-serif;color:rgb(34,34,34)">On Tue, Jul 18, 2017 at 10:03 PM, Eliot Miranda </span><span dir="ltr" style="font-family:arial,sans-serif;color:rgb(34,34,34)"><<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>></span><span style="font-family:arial,sans-serif;color:rgb(34,34,34)"> wrote:</span><br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-"><div><br></div></span><div>I'm modifying the Spur VM to fail becomeForward: when copyHash is true and the target object is immutable.  So when we have immutable literals, #normal would be immutable and the become would fail. </div></div></div></div></blockquote><div><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">​+1​</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div><div>However, it seems to me that becomerForward: doing a copyHash is itself a bug.  What's the rationale for copying the receiver's hash to the target object?  I've seen various frameworks use become to clean-up objects by doing aNoLongerWantedObject becomeFor4ward: nil, and with our current default implementation for becomeForward: that will cause havoc.</div></div></div></div></blockquote><div><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">​Well, it would mean nil's identityHash changes. But since nil isn't typically used as key in hashed collections, that use may be fine?</div></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)"><span style="color:rgb(34,34,34);font-family:arial,sans-serif">I agree that the becomeForward: default should be to not copy the hash. This could be done in the image though, no need to change the primitive.</span><br></div><div><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;color:rgb(0,0,0)">​- Bert -​</div></div></div></div>