[squeak-dev] Re: Newbie Question (about OOPs, maybe) (sorry)
Bert Freudenberg
bert at freudenbergs.de
Sat Aug 22 15:06:37 UTC 2009
On 22.08.2009, at 13:15, Adrian Lienhard wrote:
> Oh, don't use asOop. It is useless as an OID as it changes as soon
> as the GC moves the object in memory... Pointer here really means a
> C pointer.
Err, did you not read my explanation further up in this thread? This
is not the case. In Squeak, #asOop is identical to #identityHash. The
comment is wrong.
> #identityHash has only a size of 12 bits and hence is quite a weak
> hash and useless for an OID.
>
> In short, the concept of an object ID does not exist (unless, of
> course, you implement it yourself).
Indeed. I'd also say it's rarely needed, so no big issue.
- Bert -
More information about the Squeak-dev
mailing list
|