This is the mail archive of the guile@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] |
Chris.Bitmead@misys.com.au writes: > >I am not sure if the documentation makes this clear, but each module > >has its own private namespace, and only those symbols defined with > >`define-public' (or otherwise exported) and visible to modules that > >use it. This is in contrast to SLIB's require/provide, which loads > >everything into one big namespace. Namespace protection is good, it > >lets various modules have assorted private procedures and variables > >without worrying about colliding with other modules or affecting the > >user's namespace. > > Presumably slib doesn't know about "define-public". So when you use (ice-9 > slib) > how do all the slib symbols become public? Maybe (ice-9 slib) redefines > "define"? Right. Within the name space (ice-9 slib) 'define is bound to "define-public", meaning that everything defined by the slib packages loaded into that name space by `require' is exported to modules using (ice-9 slib). /mdj