Andre van Tonder scripsit:

> The following program must print 1 and -1 even if it is compiled.  Not
> having this behavior would be a changing a fundamental aspect of the nature 
> of
> Scheme, namely, that procedures are first class.
> 
>   (define (f x) (display (g x)))
>   (define g (lambda (x) x))
>   (f x)
>   (set! g (lambda (x) (- x)))
>   (f x)

Yes, you are absolutely right.  I was focused on redefinition, so I wasn't
even thinking about mutation by set!.

That makes the rule short and (I hope) sweet:

        Redefinitions of variables are retroactive;

        Redefinitions of macros are not.

To override this rule and inline things, one must have a
switch that makes the implementation non-conformant.

-- 
John Cowan    [email protected]    http://ccil.org/~cowan
        Sound change operates regularly to produce irregularities;
        analogy operates irregularly to produce regularities.
                --E.H. Sturtevant, ca. 1945, probably at Yale

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

Reply via email to