Buy GNU books!
|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
SRFI support in Guile is currently implemented partly in the core library, and partly as add-on modules. That means that some SRFIs are automatically available when the interpreter is started, whereas the other SRFIs require you to use the appropriate support module explicitly.
There are several reasons for this inconsistency. First, the feature
checking syntactic form
cond-expand (see section 39.2 SRFI-0 - cond-expand) must be
available immediately, because it must be there when the user wants to
check for the Scheme implementation, that is, before she can know that
it is safe to use
use-modules to load SRFI support modules. The
second reason is that some features defined in SRFIs had been
implemented in Guile before the developers started to add SRFI
implementations as modules (for example SRFI-6 (see section 39.6 SRFI-6 - Basic String Ports)). In
the future, it is possible that SRFIs in the core library might be
factored out into separate modules, requiring explicit module loading
when they are needed. So you should be prepared to have to use
use-modules someday in the future to access SRFI-6 bindings. If
you want, you can do that already. We have included the module
(srfi srfi-6) in the distribution, which currently does nothing,
but ensures that you can write future-safe code.
Generally, support for a specific SRFI is made available by using
(srfi srfi-number), where number is the
number of the SRFI needed. Another possibility is to use the command
--use-srfi, which will load the necessary modules
automatically (see section 9.1 Invoking Guile).
|webmaster||delorie software privacy|
|Copyright © 2003 by The Free Software Foundation||Updated Jun 2003|