Shiro Kawai scripsit:

> In CLisp 2.42, at the definition of x the imported macro is expanded
> and the subsequent redefinition of foo doesn't affect x.

Importing shouldn't matter in CL, as it only affects which symbols are
visible without a package qualifier, not what the behavior of a given
symbol is.

I tried CLisp, ABCL, ECL, CMUCL, SBCL, and CCL on my system (GCL will
not run there) on this script:

        (defmacro foo (x y z) `(if ,x ,y ,z))
        (defun x () (foo nil y 2))
        (print (x))
        (defun foo (x y z) (+ x y z))
        (print (x))

All agree with each other: 2 is printed both times.  Only CMUCL and SBCL
(which are siblings) print warnings about the redefinition.

> Allegro CL 8.1 is smart enough to warn me when I redefine foo.
> The behavior of x is altered after redefinition of foo as far as
> it is interpreted; if I compile x before redefining foo, the
> redefinition doesn't take effect.

#lisp folks tell me the ANSI standard permits this variance.

-- 
Eric Raymond is the Margaret Mead               John Cowan
of the Open Source movement.                    [email protected]
        --Bruce Perens,                         http://www.ccil.org/~cowan
          some years ago

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

Reply via email to