[ANSI-Smalltalk] A list of interesting methods, not present in the ANSI standard

Ralph Johnson johnson at cs.uiuc.edu
Thu Mar 20 08:04:52 GMT 2008


> I think the following ones are good candidates for discussion.  Since the
> list includes = and ==, I added hash and identityHash.
>
> Object>>=
>  Object>>==
> Object>>hash
> Object>>identityHash

These are core Object, and not controversial.


> Object>>ifNil:
>  Object>>ifNil:ifNotNil:
>  Object>>ifNotNil:
>  Object>>ifNotNil:ifNil:

These were widely used by the time the standard was written, but not
part of every image, and i imagine the committee decided that it
wasn't worth the effort to put them in the standard.  However, I don't
think they are controversial, either.  Since then, they have become
even more widely used.

>  Object>>become:
>  Object>>instVarAt:
>  Object>>instVarAt:put:

I can imagine VM implementors who don't want to include these.  Some
people won't like become:, others won't like instVarAt:   So, it might
be a good idea to put them in a different STEP so that a Smalltalk can
be standard without including them, i.e. it follows the STEP that
defines = but not the one that defines instVarAt:

Originally, the main use of become: was to implement Collections, but
I think a better way to implement them is to have an explicite array
to hold the contents, and then you don't need become:    For me, it is
best throught of as a debugging tool, or used to help in schema
migration.  I don't like to see it in regular application code.

> Object>>perform:

I have nothing to add to this.

-Ralph



More information about the ANSI-Smalltalk mailing list