<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        
                                        
                                            
                                        
                                        
                                        Hi Chris.<div><br></div><div>> <span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Seeing just their identifications removes a level of formality that seems to foster a better UI "connection" to the objects.</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Domain-specific objects can provide a good-enough identification in their #printOn: specialization. Maybe the class name is part of it. Maybe not. If you develop a database, for example, you surely have another notion of identity. Meaning, other than Object >> #identityhash or #oop. That other notion of (compact) identity should then be part of an object's print-string that is part of the database.</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Yet, nothing one can foresee, when thinking about Object >> #printOn:. There, you have only the meta-object protocol at hand: class name, identity hash, maybe ref counter? :-D Having a new subclass of Object, what should that #printOn: look like out-of-the-box? The class name is fine. So you can actually see that your new class' instances are populating the world. Next step should be to implement a custom #printOn: in that new class.</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Best,</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Marcel</span></div><div class="mb_sig"></div>
                                        
                                        <blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 03.06.2020 05:16:31 schrieb Chris Muller <asqueaker@gmail.com>:</p><div style="font-family:Arial,Helvetica,sans-serif">
<div dir="ltr">Hi <span style="color: rgb(0,0,0);font-size: 13px">Trygve,</span><div><span style="color: rgb(0,0,0);font-size: 13px"><br></span></div><div><span style="color: #000000">Of all the attributes that objects print, I find the "type" (class) to be one of the least interesting.  It's usually already obvious in its contextual usage.  Indeed, it is the "identity" that I, too, am interested in seeing printed.  My solution since 2006 has been an override of</span><span style="color:rgb(0,0,0)"> #printOn: that adds a one-line dispatch to #printIdentificationOn:.  I then take care in my #</span>printIdentificationOn: implementations to keep the printing as terse as it can be, and sans any line endings, to serve this seemingly recurring use-case I have of wanting a "short version" of an object's string.  For example,<span style="color:rgb(0,0,0)"> when printing the elements of a collection.  Having entire domain hierarchies exclude the type entirely from their printString's has been a fantastic experience.  Seeing just their identifications removes a level of formality that seems to foster a better UI "connection" to the objects.</span></div><div><br></div><div>Regards,</div><div>  Chris</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 2, 2020 at 7:10 AM Trygve Reenskaug <<a href="mailto:trygver@ifi.uio.no" target="_blank">trygver@ifi.uio.no</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex;border-left: 1px solid rgb(204,204,204);padding-left: 1ex;min-width: 500px">
  

    
  
  <div>
    I find it frustrating to open 3 inspectors on different objects, all
    of them titled 'aString' (or whatever),<br>
    IMO, it is much better to open them on the 3 objects: [1234]
    aString, [3456] a String, [4567 a String.<br>
    The numbers in square brackets stand for the objects <i>oop</i>,
    actually its <i>identityHash</i>. They can be a 7-digit numbers;
    much too long for my short-time memory to hold many of them. I
    therefore truncate the number to 4 digits, accepting that I may, in
    rare cases, get 2 objects with the same identifier.<br>
    <br>
    I'm running 'Squeak5.3'.
    <blockquote style="min-width: 500px"><b>Object>>printOn: aStream</b><br>
              "Append to the argument, aStream, a sequence of characters
      that identifies the receiver."<br>
              " The previous version identified the class, not the
      instance "<br>
              " This new version identifies the instance with its oop. "<br>
              " I arbitrarily truncate the oop to 4 digits to simplify
      reading. "<br>
      <br>
              | title |<br>
              title := self class name.<br>
              aStream<br>
                  nextPutAll: '[' , (self asOop printString truncateTo:
      4) , ']' ;<br>
                  nextPutAll: (title first isVowel ifTrue: ['an ']
      ifFalse: ['a ']);<br>
                  nextPutAll: title<br>
    </blockquote>
    Enjoy<br>
    --Trygve<br>
    <div>-- <br>
      
      
      
      
      
      
      
      
      
      <div>
        <p class="MsoNormal"><i><span lang="EN-US">The essence of object orientation is
              that objects <span>collaborate<span>  </span>to</span> achieve a
              goal. </span></i><span lang="EN-US"><br>
            <span>Trygve</span> <span>Reenskaug</span>      </span><span><a href="mailto:%20trygver@ifi.uio.no" target="_blank"><span lang="EN-US">mailto: trygver@ifi.uio.no</span></a></span><span lang="EN-US"><br>
            <span>Morgedalsvn</span>.
            5A       </span><span style="font-size: 10pt"><a href="http://folk.uio.no/trygver/" target="_blank"><span lang="EN-US">http://folk.uio.no/trygver/</span></a></span><span lang="EN-US"><br>
            N-0378
            Oslo             </span><span><a href="http://fullOO.info" target="_blank"><span lang="EN-US">http://fullOO.info</span></a></span><span lang="EN-US"><br>
            Norway                     Tel:
            (+47) 468 58 625 </span><span style="font-size: 10pt" lang="EN-US"><u></u><u></u></span></p>
      </div>
    </div>
  </div>

<br>
</blockquote></div>
</div></blockquote></div>