<div dir="ltr"><div dir="ltr">Hi Juan,<div><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 20, 2018 at 8:00 AM Juan Vuletich <<a href="mailto:juan@jvuletich.org">juan@jvuletich.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><u></u>

  
    
  
  <div bgcolor="#ffffff">
    Hi Eliot,<br>
    <br>
    (below)<br>
    On 19/11/2018 02:32 p.m., Eliot Miranda via Cuis-dev wrote:
    <blockquote type="cite">
      <div dir="ltr">Hi All,
        <div><br>
        </div>
        <div>    In VisualWorks Message implements #= & #hash
          naturally; two messages whose selectors and arguments are #=
          are also equal.  But in Cuis, Squeak and Pharo Message
          inherits #= and #hash from Object, i.e. uses identity
          comparison.  This is, to say the least, annoying.  Any
          objections to implementing comparing in Message to match
          VisualWorks?</div>
        <div><br>
          <div dir="ltr" class="gmail-m_825025088794748974gmail_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>
      <br>
    </blockquote>
    <br>
    Just added these implementations to Cuis:<br>
    <br>
    = aMessage<br>
        "Any object is equal to itself"<br>
        self == aMessage ifTrue: [ ^ true ].<br>
        self class == aMessage class ifFalse: [ ^false ].<br>
        selector = aMessage selector ifFalse: [ ^false ].<br>
        lookupClass = aMessage lookupClass ifFalse: [ ^false ].<br>
        ^args = aMessage arguments<br></div></blockquote><div><br></div><div>this last line should be</div><br>    ^args literalEqual: aMessage arguments</div><div class="gmail_quote"><br></div><div class="gmail_quote">and this is very important :-)</div><div class="gmail_quote"><br><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div bgcolor="#ffffff">
    <br>
    hash<br>
        "Hash is reimplemented because = is implemented."<br>
        ^selector hash bitXor: args hash<br>
    <br>
    Do they look ok? (I considered lookupClass for #=, but not for hash,
    as collisions because of that seem unlikely, and in any case,
    grouping them that way could be useful).<br>
    <br>
    Cheers,<br>
    <pre class="gmail-m_825025088794748974moz-signature" cols="72">-- 
Juan Vuletich
<a class="gmail-m_825025088794748974moz-txt-link-abbreviated" href="http://www.cuis-smalltalk.org" target="_blank">www.cuis-smalltalk.org</a>
<a class="gmail-m_825025088794748974moz-txt-link-freetext" href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev" target="_blank">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a>
<a class="gmail-m_825025088794748974moz-txt-link-freetext" href="https://github.com/jvuletich" target="_blank">https://github.com/jvuletich</a>
<a class="gmail-m_825025088794748974moz-txt-link-freetext" href="https://www.linkedin.com/in/juan-vuletich-75611b3" target="_blank">https://www.linkedin.com/in/juan-vuletich-75611b3</a>
@JuanVuletich</pre>
  </div>

</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" 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></div>