On Wed, 2010-12-15 at 02:45 -0500, John Cowan wrote:
> Be sure to look at http://synthcode.com/scheme/match.scm as well.

A quick look reveals that this matcher is very promising and written in
a very clean way using R5RS only. It does have the following properties:

* missing struct/records support? I think we should specify it, and let
  implementations decide on its efficient representation

* I didn't understand get! and set! stuff

* at some point, it does vector->list for matching inside quasiquote. 
  Isn't it a bit inefficient?

* are nested ellipses supported? Looks like they are quite useful...

* ellipses on the same level: shouldn't we allow stuff like
________________________________________________________________________

  (case '(1 2 3 - a b c)
   [`(,nums ... - ,syms ...) => (map list nums ... syms ...)])
________________________________________________________________________

  or if you like,
________________________________________________________________________

  (case '(1 2 3 - a b c)
   [(nums ... '- syms ...) => (map list nums syms)])
________________________________________________________________________

* (? predicate) matching is a bit ugly when you use (? number?). 
  Reminds me of Bigloo/Queinnec's matcher

* where are guards?

* matching numbers: we need to use (=) to match them, not equal? (or 
  eqv? and eq?)


_______________________________________________
r6rs-discuss mailing list
r6rs-discuss@lists.r6rs.org
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to