Re: Comments on draft 1 of SRFI 288 Wolfgang Corcoran-Mathe 28 Nov 2026 17:26 UTC

On 2026-11-27 13:27 -0500, Peter McGoron wrote:
> The reason I am very deferential to compatibility here is because I
> do not want implementations to “support” this by having multiple
> incompatible conditions systems.

That makes sense.  I’m impressed with how much you’ve been able to do,
given the different systems you’re trying to accommodate.

> > The overloading of the type predicate and accessors bothers me.
>
> This is how SRFI 12, SRFI 35, and R6RS conditions work.

You’re right.  I misread SRFI 35 as specifying that the predicates &
accessors work only on subtypes, not compound conditions.  But it’s
made clear elsewhere that they work on both.

My complaint is that although ‘define-condition-type’ looks very much
like ‘define-record-type’, the predicates & accessors it defines are
overloaded, something Scheme has avoided so far.

I like better the approach of SRFI 222, where ‘compound-predicate’
& ‘compound-access’ are used to lift type-specific procedures to
compound objects.  Using something similar, ‘define-condition-type’
would give you, say, ‘who-condition?’ (strictly equivalent to
a ‘define-record-type’ type-test predicate), and you would test
arbitrary conditions with (compound-predicate who-condition? con).

To me this seems to have the combination of rigor and verbosity for
which Scheme is beloved.  With a bit of syntactic sugar it might be
quite usable.  On the other hand, all of the existing Scheme condition
systems use implicit overloading, so this would conflict with your main
goal of compatibility.

> > More predicate overloading: I don’t think the SRFI should
> > specify the ghost of a condition hierarchy by making e.g.
> > serious-condition? be true of assertion violations as well.
>
> This is a collision of compatibility with R6RS and R7RS. R7RS error
> objects are used by many implementations and users for what R6RS
> would call assertion violations and errors (in this SRFI, assertion
> violations and external errors).

Yes, you’re right.  It’s unfortunate that the Reports used ‘error’
in such different ways, but an interoperable system needs to handle
both conventions.  You’ve done your homework. :-)

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