<div dir="ltr">Hello,<div><br></div><div>I agree that there is a naming problem. However, we decided to let it this way because that is the VisualWorks terminology and we wanted to be compatible.</div><div><br></div><div>We can do two things: </div><div>- change the image-side APIs only, which is easy to do (<font face="monospace, monospace">#isImmutable</font><font face="arial, helvetica, sans-serif"> =&gt; </font><font face="monospace, monospace">#isReadOnly</font> and co).</div><div>- change the terminology in the VM, which is a bit more complex and error prone.</div><div><br></div><div>So if, and only if, there is a community agreement on a new terminology, I think we could change at least the image-side.</div><div><br></div><div>I like the <font face="monospace, monospace">isReadOnly</font> or <font face="monospace, monospace">hasWriteBarrier</font> terminologies myself, but I don&#39;t mind if the community decides to choose another terminology. </div><div><br></div><div>Regards</div><div><br></div><div>Clement</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-03-03 11:08 GMT+01:00 Tobias Pape <span dir="ltr">&lt;<a href="mailto:Das.Linux@gmx.de" target="_blank">Das.Linux@gmx.de</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
<br>
On 03.03.2016, at 09:56, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
<br>
&gt;<br>
&gt; Hi Tobias,<br>
&gt;<br>
&gt;&gt; On Mar 3, 2016, at 12:10 AM, Tobias Pape &lt;<a href="mailto:Das.Linux@gmx.de">Das.Linux@gmx.de</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Hi all, Hi Eliot, Hi Clément<br>
&gt;&gt;<br>
&gt;&gt; Well, you know I&#39;m the opponent here regarding the Immutability naming.<br>
&gt;&gt; I hate that I have to come back to the naming thing here once again.<br>
&gt;&gt; But it is rather important for me, since I work on immutability concepts<br>
&gt;&gt; that are unlike what immutability would mean here. I think it is also<br>
&gt;&gt; important to know that immutability in most other languages means<br>
&gt;&gt; &quot;it won&#39;t change whatsoever&quot; (including OCaml[1], Racket[2],<br>
&gt;&gt; Haskell[3], or object-oriented programming in general[4])<br>
&gt;&gt;<br>
&gt;&gt; Now, I see the need, usefulness, and practical implementation for objects<br>
&gt;&gt; that cannot be written and hence throw an error, which _then_ can be<br>
&gt;&gt; circumvented/made be writable. I&#39;m all for it and I like it. Except<br>
&gt;&gt; for the name.<br>
&gt;&gt;<br>
&gt;&gt; As Clément put it:<br>
&gt;&gt;   &quot;As argued on the virtual machine mailing list, we are talking<br>
&gt;&gt;   about a write-barrier more than immutability itself.&quot;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; I would hence propose to name those objects<br>
&gt;&gt;<br>
&gt;&gt;   locked objects<br>
&gt;&gt;<br>
&gt;&gt; with the accompanying Someone-tries-to-write-that-Error named<br>
&gt;&gt;<br>
&gt;&gt;   ObjectIsLockedError<br>
&gt;&gt;<br>
&gt;&gt; and the state-change messages<br>
&gt;&gt;<br>
&gt;&gt;   Object&gt;&gt;lock<br>
&gt;&gt;   Object&gt;&gt;unlock<br>
&gt;&gt;<br>
&gt;&gt; and likewise the VM-information<br>
&gt;&gt;<br>
&gt;&gt;   SmalltalkImage&gt;&gt;supportsLockedObjects<br>
&gt;&gt;<br>
&gt;&gt; I know, re-iterating this is tedious, but it will avoid unmet<br>
&gt;&gt; expectations by newcomers from other languages as well as<br>
&gt;&gt; name clashes with actual immutability implementations (how should<br>
&gt;&gt; we name those, then)?<br>
&gt;<br>
&gt; No need to apologize.  I had forgotten the naming issue in my delight at fixing the actual VM issue and being able to get an immutability^h^h^h^h^h^h^h^h^h^h^h^hwrite-protect fault.  Forgive me.<br>
<br>
</div></div>I completely understand that<br>
<span class=""><br>
&gt;<br>
&gt; But locked is definitely the wrong word.  To me it evokes notions of mutual exclusion and  concurrency.<br>
<br>
</span>Yeah, but I thought more of the &#39;door lock&#39; lock.<br>
What about latch? It fits the the door lock metaphor but also the electronic meaning fits:<br>
&quot;a circuit which retains whatever output state results from a momentary input signal until reset by another signal.&quot;<br>
<br>
Best regards<br>
<span class="HOEnZb"><font color="#888888">        -Tobias<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
&gt; Tomorrow I&#39;ll rename the accessors etc to use the term read-only, so supportsReadOnlyObjects, beReadOnly isReadOnly and setReadOnly:.  Ok with you?  Any objections y&#39;all?<br>
<br>
<br>
<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; With apologies<br>
&gt;&gt;   -Tobias<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; [1]: <a href="http://typeocaml.com/2015/01/02/immutable/" rel="noreferrer" target="_blank">http://typeocaml.com/2015/01/02/immutable/</a><br>
&gt;&gt; [2]: a) <a href="http://docs.racket-lang.org/reference/pairs.html" rel="noreferrer" target="_blank">http://docs.racket-lang.org/reference/pairs.html</a> &quot;Pairs are not mutable&quot;<br>
&gt;&gt;    b) <a href="http://docs.racket-lang.org/reference/strings.html" rel="noreferrer" target="_blank">http://docs.racket-lang.org/reference/strings.html</a><br>
&gt;&gt; [3]: <a href="https://wiki.haskell.org/A_brief_introduction_to_Haskell#Immutable_declarations" rel="noreferrer" target="_blank">https://wiki.haskell.org/A_brief_introduction_to_Haskell#Immutable_declarations</a><br>
&gt;&gt; [4]: <a href="https://en.wikipedia.org/wiki/Immutable_object" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/Immutable_object</a><br>
&gt;&gt;<br>
&gt;&gt;&gt; On 03.03.2016, at 03:19, <a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a> wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Eliot Miranda uploaded a new version of System to project The Trunk:<br>
&gt;&gt;&gt; <a href="http://source.squeak.org/trunk/System-eem.803.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk/System-eem.803.mcz</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; ==================== Summary ====================<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Name: System-eem.803<br>
&gt;&gt;&gt; Author: eem<br>
&gt;&gt;&gt; Time: 2 March 2016, 7:18:21.713694 pm<br>
&gt;&gt;&gt; UUID: 934ce776-0717-469b-8818-300954393791<br>
&gt;&gt;&gt; Ancestors: System-bf.802<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Add getters that answer whether the VM supports immutability or multiple bytecode sets.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; =============== Diff against System-bf.802 ===============<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Item was added:<br>
&gt;&gt;&gt; + ----- Method: SmalltalkImage&gt;&gt;supportsImmutability (in category &#39;system attributes&#39;) -----<br>
&gt;&gt;&gt; + supportsImmutability<br>
&gt;&gt;&gt; +    &quot;Answer whether the VM observes the per-object immutability flag and consequently<br>
&gt;&gt;&gt; +     aborts writes to inst vars of, and fails primitives that attempt to write, to immutable objects.&quot;<br>
&gt;&gt;&gt; +    &quot;SmalltalkImage current supportsImmutability&quot;<br>
&gt;&gt;&gt; +<br>
&gt;&gt;&gt; +    ^(self vmParameterAt: 65)<br>
&gt;&gt;&gt; +        ifNil: [false]<br>
&gt;&gt;&gt; +        ifNotNil:<br>
&gt;&gt;&gt; +            [:param| &quot;In older VMs this is a boolean reflecting MULTIPLE_BYTECODE_SETS&quot;<br>
&gt;&gt;&gt; +             param isInteger &quot;In newer VMs it is a set of integer flags, bit 1 of which is IMMUTABILITY&quot;<br>
&gt;&gt;&gt; +                ifTrue: [param anyMask: 2]<br>
&gt;&gt;&gt; +                ifFalse: [false]]!<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Item was added:<br>
&gt;&gt;&gt; + ----- Method: SmalltalkImage&gt;&gt;supportsMultipleBytecodeSets (in category &#39;system attributes&#39;) -----<br>
&gt;&gt;&gt; + supportsMultipleBytecodeSets<br>
&gt;&gt;&gt; +    &quot;Answer whether the VM supports multiple bytecodeSets.&quot;<br>
&gt;&gt;&gt; +    &quot;SmalltalkImage current supportsMultipleBytecodeSets&quot;<br>
&gt;&gt;&gt; +<br>
&gt;&gt;&gt; +    ^(self vmParameterAt: 65)<br>
&gt;&gt;&gt; +        ifNil: [false]<br>
&gt;&gt;&gt; +        ifNotNil:<br>
&gt;&gt;&gt; +            [:param| &quot;In older VMs this is a boolean reflecting MULTIPLE_BYTECODE_SETS&quot;<br>
&gt;&gt;&gt; +             param isInteger &quot;In newer VMs it is a set of integer flags, bit 0 of which is MULTIPLE_BYTECODE_SETS&quot;<br>
&gt;&gt;&gt; +                ifTrue: [param anyMask: 1]<br>
&gt;&gt;&gt; +                ifFalse: [param]]!<br>
&gt;&gt;<br>
<br>
</div></div></blockquote></div><br></div>