NICE Language Committee: ms-eq
-----------------------------------------------------------
Key: 94-Lang-expanded-equality
Title : Semantics of `=' and `/='
Proposal from: Michael Schweitzer (late March 1994)
-----------------------------------------------------------
Discussion:
In an equality expression of the form
e = f -- or e /= f
where `e' or `f' (or both) are of expanded type the result
is the same as the result of the expression
equal (e, f)
(page 375).
On the other hand, in an instruction of the form
e := f
where `e' or `f' are of expanded type the effect is that of
applying `standard_copy' or `standard_clone' (page 317).
I think that the comment on page 317 applies to equality
expressions as well - You can always explicitely use
equal (e, f)
if you want to take advantage of redefinition.
Proposal:
I propose that `standard_equal' be used in equality expressions
if one of the operands is expanded.
Comment:
I think the language should treat the fundamental operations
of reattachment and equality testing in a consistent manner.
Either the semantics of both can be altered by the user or
none of them can be altered. Therefore I believe that we should
either use the triple (standard_copy, standard_clone, standard_equal)
or (copy, clone, equal). I prefer the former.
-----------------------------------------------------------
Agreeement from: Bertrand Meyer (late March 1994)
I agree fully with Michael's reasoning. I ``prefer the former''
as he does.
|