Email list hosting service & mailing list manager

Incompatibility with pattern matching Andre van Tonder (19 Sep 2005 14:02 UTC)
Re: Incompatibility with pattern matching Michael Sperber (20 Sep 2005 10:36 UTC)
Re: Incompatibility with pattern matching Andre van Tonder (20 Sep 2005 15:46 UTC)
Re: Incompatibility with pattern matching Michael Sperber (20 Sep 2005 16:04 UTC)
Re: Incompatibility with pattern matching Marcin 'Qrczak' Kowalczyk (20 Sep 2005 12:02 UTC)

Incompatibility with pattern matching Andre van Tonder 19 Sep 2005 14:01 UTC

It seems that the constructor paradigm chosen in the draft does not easily
accommodate future extensions for pattern matching.  The problem is that a
constructor can be many to one.  E.g., in

   (define-type foo (x y)
     (fields a immutable (+ x y)))

we cannot automatically generate a pattern that can be used (like in MzScheme):

   (match (make-foo 1 2)
    ((make-foo x y) .....))

Indeed, since the record types of this SRFI are not freely generated,
automatic destructuring is not a sensible operation.

Andre