Re: New draft (#5) and last call for comments on SRFI 257: Simple extendable pattern matcher with backtracking Sergei Egorov (19 Oct 2025 19:17 UTC)
Re: scope Sergei Egorov (20 Oct 2025 17:08 UTC)
Re: scope / order Sergei Egorov (20 Oct 2025 17:34 UTC)
Re: scope / order Daphne Preston-Kendal (25 Oct 2025 10:55 UTC)
Re: scope / order Marc Nieper-Wißkirchen (25 Oct 2025 11:36 UTC)
Re: scope / order Sergei Egorov (25 Oct 2025 15:05 UTC)
Re: scope / order Arthur A. Gleckler (25 Oct 2025 18:30 UTC)
Re: scope / order Daphne Preston-Kendal (26 Oct 2025 21:56 UTC)
Re: scope / order Daphne Preston-Kendal (26 Oct 2025 22:22 UTC)
Re: scope / order Sergei Egorov (26 Oct 2025 23:49 UTC)
Re: scope / order Arthur A. Gleckler (27 Oct 2025 00:05 UTC)
Re: scope / order Sergei Egorov (27 Oct 2025 00:11 UTC)
Re: scope / order Marc Nieper-Wißkirchen (27 Oct 2025 09:22 UTC)
Re: scope / order Daphne Preston-Kendal (27 Oct 2025 09:42 UTC)
Re: scope / order Marc Nieper-Wißkirchen (27 Oct 2025 10:14 UTC)
Re: scope / order Sergei Egorov (27 Oct 2025 16:46 UTC)
Re: scope / order Daphne Preston-Kendal (26 Nov 2025 23:00 UTC)
Re: scope / order Sergei Egorov (27 Nov 2025 01:14 UTC)
Re: scope Daphne Preston-Kendal (20 Oct 2025 18:48 UTC)
Re: scope Sergei Egorov (20 Oct 2025 20:40 UTC)
Re: scope Wolfgang Corcoran-Mathe (20 Oct 2025 21:56 UTC)

Re: New draft (#5) and last call for comments on SRFI 257: Simple extendable pattern matcher with backtracking Sergei Egorov 19 Oct 2025 19:17 UTC

I plan to add the following paragraph to the first subsection of the Specification section. Please let me know
if you think it requires further clarification.

"It is an error to refer to a pattern variable from any non-pattern sub-element of the same top pattern.
Rationale: non-pattern sub-elements usually are ordinary expressions, evaluated during the matching process; if they could access
pattern variables, the matcher would have to match sub-patterns in a fixed order so that every pattern variable has a well-defined
value, ruling out many useful optimizations."

--Sergei

-----Original Message-----
From: Daphne Preston-Kendal
Sent: Saturday, October 18, 2025 4:52 AM
To: Arthur A. Gleckler
Cc: xxxxxx@srfi.schemers.org
Subject: Re: New draft (#5) and last call for comments on SRFI 257: Simple extendable pattern matcher with backtracking

The early binding problem I mentioned in my comparison email has still not been addressed.

To re-iterate: the specification only says that pattern variables are bound in the body
<https://srfi.schemers.org/srfi-257/srfi-257.html#:~:text=become%20bound%20in%20the%20corresponding%20body>.
But the sample implementation binds them during matching of at least some other patterns as well.

Either the specification should be updated to match the implementation, or the implementation should be fixed to match the
specification. Neither will be simple, alas: I am not convinced that it is at all easy to implement this correctly in pure
syntax-rules, but the alternative is that the scoping rules are punctiliously defined in the specification text, which would likely
be quite complex. Scope is everything (Dan Friedman, as quoted by Olin Shivers) – this is an important issue.

Daphne

> On 18 Oct 2025, at 10:42, Arthur A. Gleckler <xxxxxx@speechcode.com> wrote:
>
> I've just published draft #5 of SRFI 257. It was submitted by Sergei Egorov, author of the SRFI.
> Here are Sergei's comments on the draft:
> small tweaks
> Here is the commit summary:
>     • small tweaks
>     • Drop trailing whitespace.
>     • Publish fifth draft.
> Here's the diff:
> https://github.com/scheme-requests-for-implementation/srfi-257/compare/draft-4..draft-5
> Sergei has asked me to announce last call for this SRFI. He believes that it is ready for finalization, but would like to give
> reviewers one last chance to submit corrections and feedback before we finalize it.
> In particular, I appeal to anyone reading this to try the sample implementation, run the tests, and send feedback about your
> results.
> If you're interested in this SRFI, please give your feedback via the SRFI 257 mailing list before 2025-11-01. After that, assuming
> that no major revisions are required, we will declare it final. It is important that we get your feedback before 2025-11-01. If
> that deadline is too soon for you, but you would like to contribute, please let me know so that I can extend the last-call period.
> Regards,
> SRFI Editor