[plt-scheme] Procedure equality

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Apr 30 08:31:06 EDT 2009

At Thu, 30 Apr 2009 15:16:37 +0300, Abdulaziz Ghuloum wrote:
> On Apr 30, 2009, at 3:07 PM, Robby Findler wrote:
> > I should have clarified that I don't believe mzscheme does that
> > (but mzscheme's compiler has gotten fancier since I last asked
> > Matthew about this point).
> Yes, compilers do get fancy, but one should probably not depend on
> the current fanciness of the compiler unless somebody is making a
> guarantee for one particular behavior.

Right. I view `(let ([x ....]) (eq? x x))' => #t as a guarantee of the
PLT Scheme language that constrains what the compiler can do.

The current compiler does perform the kinds of transformations that
might otherwise break the guarantee, but the transformation is
constrained so that the guarantee is preserved one way or another. In
the case of inexact numbers, for example, the transformation can
duplicate the number, but only because the bytecode marshaler tracks
sharing of inexact numbers.

Posted on the users mailing list.