[Newbies] binary message ==

Matthias Berth matthias.berth at googlemail.com
Fri Oct 31 08:04:13 UTC 2008


Mark,


== tests for object identity. Look for implementors of ==, you find it
in ProtoObject:

== anObject
	"Primitive. Answer whether the receiver and the argument are the same
	object (have the same object pointer). Do not redefine the message == in
	any other class! Essential. No Lookup. Do not override in any subclass.
	See Object documentation whatIsAPrimitive."

	<primitive: 110>
	self primitiveFailed


Cheers

Matthias

On Fri, Oct 31, 2008 at 3:05 AM, Mark Volkmann <mark at ociweb.com> wrote:
> I'm reading "Smalltalk Best Practice Patterns". On page 49 there is this
> example code.
>
> Object>>= anObject
>        ^self == anObject
>
> I've never seen == in Smalltalk before. It doesn't seem to be a method in
> Object within Squeak. What's going on here?
>
> ---
> Mark Volkmann
>
>
>
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
>


More information about the Beginners mailing list