Email list hosting service & mailing list manager


Compatibility of the "FHD" matcher Marc Nieper-Wißkirchen 29 Aug 2020 13:44 UTC

SRFI 200 claims that the "FHD" matcher (when adapted to make
quasiquotations explicit) is compatible with the pattern language
recommended by the SRFI.

This, however, is far from being true. Consider the pattern

`,(quasiquote x)

In the "WCS" matcher, this pattern is equivalent to the pattern 'x,
which just matches the symbol x.

On the other hand, in the "FHD" matcher (with the quasiquotation
twist), the pattern means that the matcher is called recursively with
the element to be matched, two values are expected and those are then
bound to the variables quasiquote and x.

This means, unfortunately, that the thesis of SRFI 200 (namely that
all three pattern matchers have the common core as described in this
SRFI) breaks down unless the recommended subset of the pattern
language is further restricted.

Another pattern that is problematic is

`,_

In the "WCS" case, this binds no variable; in the "FHD" case, this
binds the variable _. While this case can easily be excluded from the
common pattern language, it will show up in another disguise whenever
some extension of the "WCS" matcher is used that adds new special
identifier patterns.