<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">I see.&nbsp;<div>I was proposing to a guy for his phd topic that he could play with immutable structures.&nbsp;</div><div>But we will see if he will get a grant.&nbsp;</div><div>Stef</div><div><br></div><div><div><div>On 21 Sep 2015, at 15:41, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><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't work well.&nbsp; I tried it with BrouHaHa way back in the 80's; the BrouHaHa VM didn't support immutability, but one could make immutable literals rather like Symbol being almost immutable now.&nbsp; 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.&nbsp; 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>&nbsp; &nbsp; &nbsp; (WriteStream on: 'Name: ') setToEnd; nextPutAll: name</div><div><br></div><div>needs to be rewritten (with either scheme) as e.g.</div><div><br></div><div>&nbsp; &nbsp; &nbsp; (WriteStream on: 'Name: ' 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,&nbsp;Eliot</div></span></div></div></div>
</div></div>
</blockquote></div><br></div></body></html>