[plt-scheme] Procedure equality
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. Sometimes, compilers get
less fancy in one direction in order to be fancier in another.
> MzScheme does do this:
>
>> (define (f x) (lambda (y) 1))
>> (eq? (f 1) (f 2))
> #t
>
> because the lambda expressions have no free variables, so there
> is no closure.
Don't all compilers do that. ;)
Aziz,,,