Dear all,

one of the main issues I have with the pattern matcher described in this SRFI is its extensibility.

Seemingly, it cries for being extended through new keywords. Recent examples are the "***" operator or the record extensions "struct" and "object". Specific implementations may want to extend it further.

The problem with SRFI 204's match, however, is that all these extensions are not backward compatible.

Consider, (match <expr> ((object <rtd> (field x)) <body>)), for example. With Gauche's object extension, <expr> has to evaluate to a record of type <rtd>. Without Gauche's extension, <expr>, however, has to evaluate to a list of three elements, of which the third is a list with two elements (and the pattern variables (!) `object', `<rtd>`, `field`, `x` will be bound accordingly).

NB The (less powerful) pattern matcher of syntax-rules/syntax-case does not suffer from this problem.

Marc