This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: nested modules / anonymous modules
- To: Miroslav Silovic <silovic at zesoi dot fer dot hr>
- Subject: Re: nested modules / anonymous modules
- From: Jost Boekemeier <jostobfe at linux dot zrz dot TU-Berlin dot DE>
- Date: 21 Oct 1999 20:39:54 +0200
- Cc: Mikael Djurfeldt <djurfeldt at nada dot kth dot se>, Craig Brozefsky <craig at red-bean dot com>, Klaus dot Schilling at home dot ivm dot de, Marius Vollmer <mvo at zagadka dot ping dot de>, guile at sourceware dot cygnus dot com
- References: <199909131751.RAA12898@linux.zrz.TU-Berlin.DE> <xy7671ee89x.fsf@mdj-pc.nada.kth.se> <oflna9sxyo.fsf@chl.tbit.dk> <xy7k8pty0l3.fsf@mdj-pc.nada.kth.se> <m2ogf5mqkm.fsf@magnus.bothner.com> <xy7iu5ds8w9.fsf@mdj-pc.nada.kth.se> <xy77llng8t7.fsf@thalamus.nada.kth.se> <879063lowi.fsf@zagadka.ping.de> <m11ShfH-000H40C@debian> <87n1uiswly.fsf@sanpietro.red-bean.com> <xy73dwaladu.fsf@thalamus.nada.kth.se> <87k8plqvcq.fsf@sanpietro.red-bean.com> <xy7ogevahq9.fsf@thalamus.nada.kth.se> <199910152151.VAA06072@linux.zrz.TU-Berlin.DE> <7eso3c1a9v.fsf@zesoi.fer.hr>
Miroslav Silovic <silovic@zesoi.fer.hr> writes:
> Jost Boekemeier <jostobfe@calvados.zrz.TU-Berlin.DE> writes:
>
> > 3. No global state variable and a "meta" module which describes the state
> > of all modules and carries their signatures.
> >
> > ;; in the "meta" module (let's call it `config-module'):
> >
> > (define some-value 1)
> > (define mod-signature1
> > (module (ice-9 test)
> > (open (ice-9 debug))
> > (export ...)
> > (begin
> > (define a 12)
> > some-value ; -> error
>
> ^^^^^^^^^^^^^^^^^^^^^
>
> This semantics breaks lexical scoping and is clearly unacceptable in
> Scheme.
Umm. Why do you think that (eval ...) is not acceptable?
(module (root)
(begin (define x 12)
(module (sub1))
(begin (define x (+ x 1))
(module ...))))
>and please explain why it's the same as having no modules at all
When you open and extend the root module you implicitly open and
extend *all* modules.
Jost