Re: [Scheme-reports] [r6rs-discuss] [scheme-reports] Scheme pattern matching & R*RS Jim Wise (21 Dec 2010 17:17 UTC)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
Re: [Scheme-reports] [r6rs-discuss] redefining eqv? Peter Kourzanov (22 Dec 2010 20:32 UTC)
Re: [Scheme-reports] [r6rs-discuss] redefining eqv? Thomas Bushnell, BSG (22 Dec 2010 21:02 UTC)
Re: [Scheme-reports] [r6rs-discuss] redefining eqv? Eli Barzilay (22 Dec 2010 23:37 UTC)
(missing)
(missing)
(missing)
(missing)
Re: [Scheme-reports] [r6rs-discuss] Bigloo Peter Kourzanov (22 Dec 2010 20:35 UTC)
Re: [Scheme-reports] [r6rs-discuss] Bigloo Thomas Bushnell, BSG (22 Dec 2010 21:01 UTC)
Re: [Scheme-reports] [r6rs-discuss] returning back to pattern matching Thomas Bushnell, BSG (22 Dec 2010 21:55 UTC)
Re: [Scheme-reports] [r6rs-discuss] returning back to pattern matching Thomas Bushnell, BSG (23 Dec 2010 19:47 UTC)
Re: [Scheme-reports] [r6rs-discuss] returning back to pattern matching Thomas Bushnell, BSG (24 Dec 2010 00:53 UTC)

Re: [Scheme-reports] [r6rs-discuss] [scheme-reports] Scheme pattern matching & R*RS Jim Wise 21 Dec 2010 17:16 UTC
Peter Kourzanov <peter.kourzanov@gmail.com> writes:

> Jim,
>
> I would like to know why (case) is excluded from this proposal.

I did not include case for two reasons:

a.) existing match libraries do not have an analogue of case

b.) RNRS case's syntax does not lend itself to extending to the pattern
    matching case in an upwardly compatible manner.  In particular, case
    compares values with eqv? and performs no binding, while lambda and
    the let forms are all binding forms (and compare with equal? in the
    pattern-matching versions).

    This means that making case destructure its arguments would change
    the meaning of existing valid code, at least for non-list,
    non-vector patterns:

               (case 'a
                 ((a) (list a))
                 (else #f))

               ==> (3)

Neither of these is necessarily compelling, but I think both argue that
adding pattern matching support to case is more intrusive than adding it
only to the environment-constructing forms.  On the other hand, the
(match ...) form of (rnrs match) can be used in a manner similar to
(case ...), but with no compatibility concerns for existing code.

Thoughts?
--
				Jim Wise
				jwise@draga.com
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports