[R6RS] `eqv?' on immutable records
R. Kent Dybvig
dyb at cs.indiana.edu
Tue May 15 12:52:06 EDT 2007
> > I don't think that's true. Transformations that programmers perform on
> > their own code are never bound by the semantics of the language.
>
> That's a rather cynical view. It seems to me that
> one of the primary purposes of a semantics is to
> allow programmers to reason about transformations,
> even if many programmers still prefer to operate
> by modify-and-pray.
You're right. While my claim is, perhaps unfortunately, true, it's not
what I meant to say. What I meant was that programmers can perform a
transformation that apparently violates the language semantics but doesn't
actually because of knowledge the programmer has about the program. For
example, a programmer may know that a program doesn't apply eq? or eqv?
to any quoted constants or procedures, allowing the use of ordinary beta
substitutions, even if the semantics would not otherwise support that use.
This may be true even if no tractable compiler analysis can establish the
preconditions for performing the transformation.
Kent
More information about the R6RS
mailing list