Re: How to "signal" (or "require") that a certain Scheme implementation provides a certain SRFI Ciprian Dorin Craciun 28 Mar 2018 19:05 UTC

On Wed, Mar 28, 2018 at 8:34 PM, John Cowan <xxxxxx@ccil.org> wrote:
>> Wait, I was wrong.  The canonical way should be
>> (cond-expand (srfi-N))
>
>
> SRFI 0 cond-expand doesn't assume the same set of primitive features as R7RS
> cond-expand.  In particular, (library (srfi N)) is the right way on R7RS.

:)  My point on allowing a simple `(import (srfi 62))` and be done with it...

On Wed, Mar 28, 2018 at 8:13 PM, Shiro Kawai <xxxxxx@gmail.com> wrote:
> Note that cond-expand throws an error if the feature requirement is not
> satisfied, so if you don't need to customize the error message,
> (cond-expand ((library (srfi N)))) should suffice the purpose.

It seems that just a simple `(cond-expand ((library (srfi 62))))`
doesn't throw any error at least in Chibi (it just expands into `#t`).
(In Gauche it does give an error.)

Therefore the only "portable" (as in "sure") way is to explicitly
check for `not condition` and throw an error.  :)

Ciprian.