[R6RS] syntax-case

Marc Feeley feeley
Fri Oct 15 20:22:55 EDT 2004

> I agree in principle and would be happy to work with you on this,
> but there are some fundamental differences between syntax-case and
> general-purpose matchers like match-case that might prevent their
> unification.

Can you elaborate on this.  I'm not sure what you are refering to.

>   If we can't make them 100% the same, perhaps we can still
> make them compatible in some sense so that programmers familiar with one
> can easily use the other and so that implementations can use a common
> underlying implementation.

I agree that this would be good.

Pattern-matching and the record system should work well together, so that
this could be done:

  (define-type add x y)

  (define (simplify expr)
    (match expr ()
      ((add 0 a) a)
      ((add a 0) a)
      ((add a b) (and (number? a) (number? b)) (+ a b))
      (else      expr)))


More information about the R6RS mailing list