Re: Glasgow haskell vs. Lispworks



Jon Harrop <jon@xxxxxxxxxxxxxxxxx> writes:
Observationally, A is identical to B if both are equal and remain equal
under any change to A. If I can't change A, equality implies identity...

Surely two different expressions can evaluate to equal values that are
distinct in memory (not identical)?

Well, these like identity and equality are only meaningful within the
language semantics. In a pure FPL, two expressions have the same
identity if the denote the same value. Memory locations may be part
of the implementation but aren't in the language semantics. Otherwise
constant integers could change their identity every time the GC moved
them.
.



Relevant Pages

  • Re: Glasgow haskell vs. Lispworks
    ... under any change to A. If I can't change A, equality implies identity... ... Surely two different expressions can evaluate to equal values that are ... Even 'language semantics' needs to be mapped to real machines ... with finite memory. ...
    (comp.lang.functional)
  • Re: Glasgow haskell vs. Lispworks
    ... two expressions have the same ... identity if the denote the same value. ... Memory locations may be part ... of the implementation but aren't in the language semantics. ...
    (comp.lang.functional)