This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Another macro/module question related to implementing srfis.


Mikael Djurfeldt <mdj@mdj.nada.kth.se> writes:

> It's a bug in the module system.  The effect of `define-module' does
> not take place until next form in the input (e.i. things coming
> after the begin expression).

OK.  So I guess there's no easy workaround in the current system...  I
guess I'll just keep the define-modules in a tacked-on header bit for
now.

> (cond-expand
>   (guile
>     (define (optimized-helper baz) ...))
>   ...)
> 
> (define (foo bar)
>  ...)
> 
> If you have problems with name space cluttering, you can use the
> module system.

Right, but, as in the example I posted, if you want to use cond-expand
in plain old r5rs code within a local scope to avoid name space
cluttering, you're sunk.  That's a bit of a nuisance.

> If you absolutely must have conditional constructs within a
> procedure, you can use conditional definition of macros.

Hmm.  Given macro "bindings" that are appropriately scoped, that
works, but since there's still no least-common-denominator macro
system across guile/rscheme/stalin/etc., it still doesn't look to me
like it helps with "scoped conditional compilation".

Thanks for the help.

-- 
Rob Browning <rlb@cs.utexas.edu> PGP=E80E0D04F521A094 532B97F5D64E3930

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]