On Mon, Feb 23, 2009 at 12:08 AM, Andrew Reilly
<[email protected]> wrote:
>
> What I don't understand is why having some nicely defined
> meaning for "finished" programs should preclude a useful
> semantics for "work-in-progress" programs (REPL).  Can't we have
> both?  Please?

The trouble is that it's hard to give them consistent semantics.
Consider this program:

(import (rnrs))

(define-syntax definline
   (syntax-rules ()
     [(_ (n . args) body)
      (define-syntax n
         (syntax-rules ()
            [(_ . args) (lambda () body)]))]))

(definline (even-printer n) (if (even? n) ((print-even n)) #f))
(define p (even-printer 12))
(definline (print-even n) (begin (display n) (display " is even")))
(p)

It should display "12 is even".

Now run that program in your favorite REPL.  You'll likely get a
message like this one from Larceny's ERR5RS REPL:

Error: Undefined global variable "print-even".

-- 
sam th
[email protected]

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

Reply via email to