Linting pattern-matchers for portability
Lassi Kortela 27 Jun 2020 12:20 UTC
> We can talk about SRFI-200 compliance in terms of implementations (for
> example, the Racket matcher is SRFI-200-compliant) but also in terms of
> patterns themselves (and thus, for example, patterns that contain
> ellipses are non-SRFI-200-compliant).
>
> I imagine SRFI-200 to be a "consensus" pattern language - or a subset
> that could be used in the Scheme programs that want to be portable
> between pattern matchers available on different systems.
How hard would it be to write a linter that, given a `match` (or other
pattern-matching form) written by the user, would say which known
pattern languages that `match` is compatible with?
Given the proliferation of pattern-matchers and the subtleties of
pattern-matching languages, I suspect this kind of linter would
eventually be a must for people who want to write portable Scheme.