[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] Comments on draft 6
Andy Wingo writes:
> On Fri 24 Feb 2012 13:53, Jussi Piitulainen writes:
>
> > Implementations can do anything they like when the report says "it
> > is an error".
>
> Implementations can do whatever they like, in general ;-)
But implementations _of R7RS_ can do what they like when R7RS says
that something "is an error". That statement does not require them to
_signal_ an error, or to do something silly.
I think that was John Cowan's point: to leave things unspecified in a
way that allows implementations to specify them if they like. (I'm
uneasy about assignments to variables that haven't been defined in the
program, so I don't care myself.)
> But consider:
>
> (define t 1)
> (let ()
> (define-syntax define-const
> (syntax-rules ()
> ((_ var val)
> (begin
> (define t val)
> (define (var) t)))))
> (define-const foo 2)
> t)
>
> In Scheme, this must evaluate to 1. I think all implementations
> support this.
>
> Now consider:
>
> (define t 1)
> (define-syntax define-const
> (syntax-rules ()
> ((_ var val)
> (begin
> (define t val)
> (define (var) t)))))
> (define-const foo 2)
> t
>
> Does Scheme consider it a goal to specify the result of this
> program?
I don't know. Is it different from the following?
(define t 1)
(define t 2)
(define (foo) t)
t
(Yes, I may be missing a lot here. :)
_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports