<div dir="ltr">Hi Stef,<br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Sep 20, 2015 at 11:51 AM, stepharo <span dir="ltr">&lt;<a href="mailto:stepharo@free.fr" target="_blank">stepharo@free.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
Hi eliot<br>
<br>
I thought that with Spur we could start to take advantages of the immutability bit. Now what is special with literals?<br>
We could have ImmutableString ImmutableSymbol? (I know that immutability is the instance level but may be the class should get impacted too).<br></blockquote><div><br></div><div>In my experience the special class approach doesn&#39;t work well.  I tried it with BrouHaHa way back in the 80&#39;s; the BrouHaHa VM didn&#39;t support immutability, but one could make immutable literals rather like Symbol being almost immutable now.  Instead, the compiler simply uses the immutability bit to mark the literals in a method as immutable, and just uses the normal classes for literals.  This is the approach we took in VisualWorks and it works well.</div><div><br></div><div><br></div><div>But note that code that wants to use literals as the starting point for building a mutable collection, e.g.</div><div><br></div><div>      (WriteStream on: &#39;Name: &#39;) setToEnd; nextPutAll: name</div><div><br></div><div>needs to be rewritten (with either scheme) as e.g.</div><div><br></div><div>      (WriteStream on: &#39;Name: &#39; copy) setToEnd; nextPutAll: name</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

Stef<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>