The Scheme Request for Implementation (SRFI) process grew out of the Scheme Workshop held in Baltimore, MD, on September 26, 1998, where the attendees considered a number of proposals for standardized feature sets for inclusion in Scheme implementations. Many of the proposals received overwhelming support in a series of straw votes. Along with this there was concern that the next Revised Report would not be produced for several years and this would prevent the timely implementation of standardized approaches to several important problems and needs in the Scheme community. Only the implemented SRFIs are (briefly) presented here. For further information on each SRFI, please look at the official SRFI site. STklos supports 84 finalized SRFIS. Some of these SRFIS are embedded and some are external. An embedded SRFI can be directly used without any particular action, whereas an external needs to be loaded. The following SRFIS are implemented:
Using a particular SRFI can be done with the special form
For instance, to use srfi-n, you can use
This forms does nothing if srfi-n is an embedded SRFI and ensures that all the files needed by this SRFI will be properly loaded if it is an external SRFI. STklos also offers the primitive require-feature which ensures (eventually) the loading of files needed to use a given SRFI. This primitive accepts several forms to ensure that the SRFI can be used. For instance, to use SRFI-1 the following forms are possible:
The list of the aliases defined for the supported SRFIs is given in figure 3 As said before, a embedded SRFI can be used directly without loading a support file. (Note that using require-feature works too and permits to ignore if the SRFI is embedded). List of embedded SRFIs:
An external SRFI needs to load at least one external file. This can be done with require or require-feature. As with embedded SRFIS, using require-feature permits to ignore if the SRFI is external. List of external SRFIs:
For some SRFIs, STklos accepts that uses them with a name. This names are given the table 3.
Previous section described the general way to use the SRFIS implemented in STklos. This section concentrates on information not given above. SRFI-0 defines the STklos Furthermore, the feature identifier stklos and STklos are defined for applications which need to know on which Scheme implementation they are running on. SRFI-10 is fully supported. This SRFI extends the
STklos reader with the " SRFI-16 is fully supported. Note SRFI-17 is fully supported. See the documentation of procedures SRFI-22 describes basic prerequisites for running Scheme programs as Unix scripts in a uniform way. Specifically, it describes:
SRFI-22 recommends to invoke the Scheme script interpreter from the script via a /usr/bin/env trampoline, like this: where <executable> can recover several specified names.
STklos uses only the name stklos-script for
<executable> .Here is an example of the classical
SRFI-27 is fully supported. Using primitives random-integer or random-real automatically loadthis SRFI. SRFI-28 is fully supported. Note that STklos SRFI-35 is fully supported. See section Predefined Conditions for the predefined conditions and when it is required to load this file. SRFI-36 is fully supported. See section Predefined Conditions for the predefined conditions and when it is required to load this file. SRFI-55 is fully supported. Furthermore, STklos also accepts the symbols defined in figure 3 in a require-extension clause. SRFI-69 is fully supported. Note that the default comparison function in STklos is SRFI-88 is fully supported. The only difference between the keywords defined in the SRFI document and the STklos keywords is on the zero-length keyword: in STklos, the keyword : is equivalent to the keyword ||:, whereas the srfi considers that : is not a keyword but a symbol. SRFI-169 is fully supported. See accept-srfi-169-numbers to eventually forbid the usage of underscores in numbers. |