On Sat, 12 Sep 2009 17:18:39 -0400, Andre van Tonder <[email protected]>  
wrote:

> On Sat, 12 Sep 2009, Joe Marshall wrote:
>
>>> (2) Should R7RS specify a REPL and its semantics?
>>
>> No.  I've seen three `theories' of REPL.
>>  1) Traditional
>>  2) DrScheme:  reload the world every time you press run
>>  3) An unusual backpatching module style that attempted to present
>>      the illusion of a standard REPL but worked by generating a module
>>      that captured the state of interaction so far.
>
> (2) is really the same as (1) - AFAIR DrScheme has a traditional REPL
> with the usual REPL semantics.  It is just restarted by the run button,
> but apart from that it behaves as if you retyped the forms in the  
> definition
> window one by one at the prompt.

These really aren't the same. In the traditional REPL, something like this  
would work:

> (define x 5)
> (define-syntax z (lambda (y) x))
> (z)
5
>

But in something like PLT (and Scheme48, I think), if you try to do this  
you will get an out of context error because they separate out the phases.

These sorts of subtle differeneces, for which everyone has ready  
justification, make standardizing a REPL very difficult. I certainly don't  
want PLT's way, and the PLT people would probably not change even if the  
standard said otherwise.

        Aaron W. Hsu

-- 
Of all tyrannies, a tyranny sincerely exercised for the good of its  
victims may be the most oppressive. -- C. S. Lewis

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to