SRFI 282: R7RS mentions widgets but defines no 'widget?' Wolfgang Corcoran-Mathe 17 Sep 2026 20:47 UTC

Artyom,

I respect the audacity of defining predicates for things that either do
not exist or are not yet detectable.  But I’m not so sure creating types
by fiat is a good idea.  As others have said, SRFI 282’s predicates
aren’t really usable in programs, so their only reason to exist seems
to be theoretical completeness, or to nudge Scheme implementers to
create more disjoint types (or, in the case of ‘library?’, to create
a new type out of whole cloth).

As to the predicates themselves, I see two groups.  ‘parameter?’,
‘environment?’, and ‘syntax-transformer?’ are straightforward.  I would
have no complaints if a Scheme implementation decided to distinguish
these types.  (But the question for *you*, the SRFI author, is why
should they?)  ‘library?’ is something else entirely.  The idea of
first-class libraries or modules in Scheme is fascinating, but this
is an absurd way to propose it.  Surely it would be more useful to
add ‘library?’ to a detailed specification of first-class libraries
than to drop it here as an alleged missing piece.  As it stands,
SRFI 282 all but guarantees that the handful of people who adopt
‘library?’ will make it an alias for ‘(constantly #f)’.  I strongly
suggest removing it; it is not only half-baked, but quite raw.

The point about alleged missing pieces brings me to another suggestion:
rename the SRFI and rewrite the Rationale.  There is nothing “missing”
about these predicates with respect to R7RS-small.  Two of SRFI 282’s
types (libraries and syntax transformers) don’t exist in the Report,
and there is no indication the editors ever intended to distinguish
the other two.  You seem to suggest that these were omitted because
of an oversight.  This inaccurate framing is used to get the SRFI off
the rationale hook: as long as these predicates are simply “missing”,
you don’t need to come up with a real reason for creating them.
The Rationale’s circular reasoning is evidence of this: you say “the
predicate set essentially defines what types of objects semantically
‘exist’”, then claim that the types you define “otherwise exist in
Scheme”.  This extension needs to justify its own existence, not
suggest that it is somehow a patch on the R7RS.

I’m sorry for the length of this message, and for falling into a tone
of invective.  (It’s just a proposal for four Boolean procedures,
after all!)  I really do like the idea of first-class libraries, and
would be happy to see a Scheme in which ‘library?’ was a meaningful
procedure. I can see reasons for some of the other types, as well.
But I think SRFI 282’s way is simply the wrong way to propose new types.

Regards,

Wolfgang

--
Wolfgang Corcoran-Mathe  <xxxxxx@sigwinch.xyz>