I know that I am a pain in the backside, but I don't think that SRFI 204 in its current state is suitable for finalization.  I do care because SRFI 204 describes an important pattern matcher, for which it is not unlikely to be included in R7RS-large.  Especially for the latter purpose, a good specification is needed so that compatible pattern matchers can be built just by reading it.

The following are a number of points that are not yet addressed by SRFI 204 (unless I have overseen something):

- When and how often are the expressions that evaluate to procedures, predicates, etc. evaluated?
- Syntax is often conflated with values.  Please use the entry format of R7RS (or R6RS) in the formal specification.
- What does <number> mean? A numeral? Of which kind? An expression evaluating to a number?
- What does the failure thunk do?  Does it abort the current continuation?  Or does it have to be called in tail position with respect to the pattern body?
- The object record matcher is not compatible with R7RS record types (when the field names are <identifiers>, see SRFI 150 for some discussion).
- Remove tree patterns from the spec if they are not mandatory.
- It seems that pattern variables are now bound (lately) in the body as in the original matcher by Wright (and which is, IMO, the right thing).  Is this correct?
- (var ...), which seems important, is not described.
- I don't understand the "Error" section.  What of it is part of the specification and what just describes the sample implementation?  The latter things should be moved to the section about the sample implementation.
- How does `match' handle cyclic data?

Minor points:

- RnRS does not use the notion of "s-expression".  The correct terminology can be datum, constant, literal, etc.  Thus, "pattern s-expression" should probably be renamed.
- The match-letrec sample implementation does not work in all corner cases (as was discussed extensively).  It's limits should be noted and also that a full implementation is, in principle, possible.
- It would be nice to have some benchmarks between using match and direct implementation, e.g. for the transpose example.

Personal opinion:

- The order in which the patterns and subpatterns are matched should be unspecified.  This improves the "declarativeness" of the matcher.

-- Marc

Am Mo., 23. Aug. 2021 um 23:45 Uhr schrieb Felix Thibault <xxxxxx@gmail.com>:
I am going over the SRFI to see if there are any corrections I need to
make before I submit it for a final draft. If you have any feedback,
please let me know.

Thanks,
    Felix Thibault