==

Compares two objects for identity.  Returns true if object1 and object2 are identical.  Otherwise, it returns false.

Objects are considered identical if they are computationally equivalent.  That is, there is no way for any possible Dylan program to distinguish them.

At an implementation level, this will usually mean that the objects are pointers to the same storage or are the same immediate value.  An extension is made for built-in number classes and characters.  Because these objects are not mutable (i.e., cannot be changed), two of the same class with the same value will always be the same (and will thus be indistinguishable to programs).

Exported from

Modifiers

sealed

Arguments

object1An instance of <object>.
object2An instance of <object>.

Values

booleanAn instance of <boolean>.

See also

The common-dylan module.
Whenever possible, we have tried to keep the Dylan module pristine and unextended, preferring to add our extensions to separate modules or libraries.
The class of all Dylan objects.
The class of boolean values.
Dylan provides an identity function, as well as a group of equality and magnitude comparison functions that can be extended for user classes.