A surprising number of seemingly separate issues in the
design of E all come together
in the definition of the equality operations -- security, the reference
taxonomy, partial order constraints, the object-passing taxonomy, and
the collection classes. E has
two equality operations, the predicate same and the function
join.
- In the E language, one
tests if two references, x and y, are the same with "x == y".
The Java/ELib programmer instead says "E.same(x, y)".
Both are spoken as "Is x the same as y?".
- In the E language, one
forms the join of x and y with " def z := E.join(x, y)",
which is spoken as "z is a vow for the join of x and y."
This Chapter uses the notation of the E
language, but the Java/ELib programmer should find everything easy to
translate.
Reference Sameness
When are two references the same? Reference sameness and object
sameness are mutually recursive definitions, but the base cases are
mostly in object sameness, which should therefore be read first.
Argument Passing Rules
When a reference of a given kind is passed by an invoation of a
given kind, what kind of reference is received?