guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: macro expand in a specified module


From: Dirk Herrmann
Subject: Re: macro expand in a specified module
Date: Sat, 10 Mar 2001 10:23:20 +0100 (MET)

On Sat, 10 Mar 2001, Keisuke Nishida wrote:

> (define (expand x e)
>   (if (pair? x)
>       (let* ((s (car x))
>            (v (and (symbol? s) (module-defined? e s) (module-ref e s))))
>       (if (defmacro? v)
>           (expand (apply (defmacro-transformer v) (cdr x)) e)
>           (cons (expand (car x) e) (expand (cdr x) e))))
>       x))
> 
> > May I add this to ice-9.scm?  I think this procedure looks good
> > because it is symmetry to eval.
> 
> I mean boot-9.scm.

Please, we should try to avoid adding stuff to boot-9.scm.  Stuff in
boot-9.scm should (as the name indicates) be restricted to things that are
absolutely necessary to get guile booting.  (Admitted:  There is already
a lot of other stuff in there that is not really needed, but that has
disturbed me for some time.)  This code is unlikely to be needed by
everybody in every session.  However, if added to boot-9 it will always
increase guile's memory footprint and garbage collection time.

But, this isn't meant to criticise your code, I just prefer to have it
added to some module instead of boot-9.scm.

Best regards,
Dirk Herrmann




reply via email to

[Prev in Thread] Current Thread [Next in Thread]