On Sat, 12 Sep 2009, Aaron W. Hsu wrote: > On Sat, 12 Sep 2009 17:18:39 -0400, Andre van Tonder <[email protected]> > wrote:
>>> 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. Same in the Larceny REPL. The issue you raise, of how the syntactic tower should work, is entirely orthogonal from the REPL issue. The above can be made to work or not in a REPL depending on your chosen model of syntactic tower. At least in "Small Scheme", this issue can be avoided entirely by having syntax-rules be the only macro system. Andre _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
