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]

Re: require vs use-modules


Chris Bitmead <chrisb@ans.com.au> writes:

> What if any is the relationship between slib's (require ..) and guile's
> (use-module ...)

`use-modules' tells Guile which modules from which we should import
bindings.

`require' tells Guile that a certain slib library should be loaded
into and exported from the (ice-9 slib) module.

> Should I favour one over the other?

Yes, depending on situation: Use `use-modules' when loading Guile
modules.  Use `require' when loading slib libraries.

> Are they interchangable?

No.

> Are they meant for different purposes?

Yes.

/mdj