[racket] interaction vs definition window: difference in semantics?

From: Mattias De Wael (madewael.mailinglists at gmail.com)
Date: Fri Feb 14 07:15:10 EST 2014

Dear all

I was wondering if anyone could explain me what the difference is in semantics
between evaluating a function definition in the "interactions window" versus
evaluating the same definition in the "definitions window"?

The motivation of my question is the following small Racket program, which
behaves differently depending on where I evaluated the definition:

==================================
| DrRacket 
==================================
#lang racket
; Definitions window
(define eval (lambda () eval))
==================================
> (eq? eval (eval))
#t
==================================



==================================
| DrRacket 
==================================
#lang racket
; Definitions window
; empty
==================================
> (define eval (lambda () eval))
> (eq? eval (eval))
#f
==================================

Is this behaviour intended?

Sincerely yours,

Mattias 


--
Mattias De Wael
Vrije Universiteit Brussel
Faculty of Sciences, DINF - SOFT
Room 10F719, Pleinlaan 2, B-1050 Brussels, Belgium
e-mail: madewael at vub.ac.be



Posted on the users mailing list.