Re: Optional features in SRFIs Lassi Kortela 24 Jan 2020 18:43 UTC

>>     The R7RS version of cond-expand supports (library (foo bar))
>>     expressions
>>     to test for a library that can be imported using (import (foo bar)).
>>     Would it work in principle to put part of the procedures in a SRFI into
>>     a separate library, or have I misunderstood how (library ...) works?

> Yes, a SRFI can document multiple libraries, and can say that all or
> only some are required for conformance, and cond-expand can figure out
> what libraries are in fact available and perhaps work around any that
> are missing.
> What Scheme programs can't currently do is to reflect at the level of
> "Does this library provide this procedure/macro, or not?"

That limitation is probably a blessing in disguise. It seems like
dubious design if a particular library exports a different set of
identifiers depending on environmental conditions.