<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-15"
 http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi All,<br>
IMO, every object has three essential properties: Identity, State, and
Behavior. In Smalltalk, State and Behavior are defined by the object's
flattened class hierarchy. The Object ID is not explicitly available. I
have am using 'asOop', hoping I  get a unique value. But I realize that
I am skating on thin ice because its comment confuses me with
implementation details. It doesn't say what it means by 'pointer', so
there is still hope:<br>
<br>
<i>Object&gt;&gt;asOop<br>
    "Primitive. Answer a SmallInteger whose value is half of the
receiver's <br>
    object pointer (interpreting object pointers as 16-bit signed
quantities)..."</i><br>
<br>
<i>ProtoObject&gt;&gt;identityHash<br>
    "Answer a SmallInteger whose value is related to the receiver's
identity..."<br>
</i>This is pretty vague, but the term 'Hash' indicates that many
objects can share the same value. So it is clearly cannot be used as
the objectID.<br>
<br>
The Morph&gt;&gt;printOn: implementation is less than ideal because it
should apply to all objects, not only Morphs. Also, it should use
'asOop' rather than 'identityHash' to let us hope for uniqueness.<br>
<br>
In short:<br>
<ul>
  <li>Smalltalk claims to be object oriented and I regard it as a
serious flaw that the object ID is not explicitly visible.</li>
  <li>We probably need a 64-bit VM to represent it properly, e.g.,
using the standardized definition of OID, but a value that is
guaranteed to be unique within the current set of objects would be
acceptable..</li>
  <li>I regard it as a bug that Object&gt;&gt;printOn: does not present
some kind of object ID. </li>
</ul>
Cheers<br>
--Trygve<br>
<br>
<br>
On 2009.08.20 06:37, K. K. Subramaniam wrote:
<blockquote cite="mid:200908201007.18504.subbukk@gmail.com" type="cite">
  <pre wrap="">On Wednesday 19 Aug 2009 11:07:29 am Ronald Spengler wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Ah, so the GC in the VM swizzles the pointers out from under you.
<a class="moz-txt-link-freetext" href="http://lists.squeakfoundation.org/pipermail/squeak-dev/1999-June/006170.htm">http://lists.squeakfoundation.org/pipermail/squeak-dev/1999-June/006170.htm</a>
l

    </pre>
  </blockquote>
  <pre wrap=""><!---->This is the classic dilemma between name as an identifier and name as a 
locator. The word "pointer" connotes the latter but gets used widely in the 
former sense in Smalltalk code. Object Identifier (oid) is unambiguous but 
doesn't sound half as cool as oop ;-).

Subbu



  </pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="ProgId" content="Word.Document">
<meta name="Generator" content="Microsoft Word 10">
<meta name="Originator" content="Microsoft Word 10">
<link rel="File-List" href="TrygveSignature-filer/filelist.xml">
<title>-- </title>
<!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:HyphenationZone>21</w:HyphenationZone>
  <w:PunctuationKerning/>
  <w:DrawingGridHorizontalSpacing>6 pt</w:DrawingGridHorizontalSpacing>
  <w:DrawingGridVerticalSpacing>6 pt</w:DrawingGridVerticalSpacing>
  <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>
  <w:DisplayVerticalDrawingGridEvery>3</w:DisplayVerticalDrawingGridEvery>
  <w:UseMarginsForDrawingGridOrigin/>
  <w:DoNotShadeFormData/>
  <w:Compatibility>
   <w:FootnoteLayoutLikeWW8/>
   <w:ShapeLayoutLikeWW8/>
   <w:AlignTablesRowByRow/>
   <w:ForgetLastTabAlignment/>
   <w:LayoutRawTableWidth/>
   <w:LayoutTableRowsApart/>
   <w:UseWord97LineBreakingRules/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]-->
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
span.GramE
        {mso-style-name:"";
        mso-gram-e:yes;}
 /* Page Definitions */
 @page
        {mso-page-border-surround-header:no;
        mso-page-border-surround-footer:no;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;
        mso-header-margin:35.4pt;
        mso-footer-margin:35.4pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
        {mso-style-name:"Vanlig tabell";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]--><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="2050"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1"/>
 </o:shapelayout></xml><![endif]-->
<div class="Section1">
<p class="MsoNormal" style=""><span class="SpellE"><span
 style="font-size: 10pt; font-family: Arial;" lang="EN-GB">Trygve</span></span><span
 style="font-size: 10pt; font-family: Arial;" lang="EN-GB">
Reenskaug<span style="">       </span>mailto: <span class="SpellE"><a class="moz-txt-link-abbreviated" href="mailto:trygver@ifi.uio.no">trygver@ifi.uio.no</a></span></span><span
 style="font-size: 10pt; font-family: Arial;"><o:p></o:p></span></p>
<p class="MsoNormal" style=""><span class="SpellE"><span class="GramE"><span
 style="font-size: 10pt; font-family: Arial;" lang="EN-GB">Morgedalsvn</span></span></span><span
 class="GramE"><span style="font-size: 10pt; font-family: Arial;"
 lang="EN-GB">.</span></span><span
 style="font-size: 10pt; font-family: Arial;" lang="EN-GB"> 5A <span
 style="">        </span><a class="moz-txt-link-freetext" href="http://heim.ifi.uio.no/~trygver">http://heim.ifi.uio.no/~trygver</a><o:p></o:p></span></p>
<p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: Arial;">N-0378
Oslo<span style="">               </span>Tel: (+47) 22 49 57 27<o:p></o:p></span></p>
<p class="MsoNormal" style=""><span class="SpellE"><span
 style="font-size: 10pt; font-family: Arial;">Norway</span></span><span
 style="font-size: 10pt; font-family: Arial;"><o:p></o:p></span></p>
</div>
</div>
</body>
</html>