[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] [r6rs-discuss] returning back to pattern matching



I have no objection to a form like CASE* where

(case* predicate clauses...) behaves like CASE, but uses PREDICATE for its equality test.

However, because CASE is for literals, eqv? seems fine to me. The reason we started on this tangent was because of the idea that CASE should be for more than literals and (ick) should become some sort of binding form.

I agree that having lots of switch-like constructs is a problem. This is why I like to use COND.

Thomas

On Wed, Dec 22, 2010 at 1:47 PM, Peter Kourzanov <peter.kourzanov@x> wrote:

On Wed, 2010-12-22 at 13:01 -0800, Thomas Bushnell, BSG wrote:
> That may well be, but we shouldn't change Scheme because Bigloo
> doesn't implement something correctly.  That it gets case/eqv? wrong
> is hardly important, since it gets tail calls wrong too. It's Not
> Scheme.
>

Well, it all started with pattern matching, which is also not
Scheme (yet, hopefully), and this discussion has now digressed
from the merits of extending (case) to do pattern matching into
fine details of eqv? R*RS standards.

Summarizing, I think it needs to be re-thought what it means for
(case) to always use eqv? Especially with pattern matching in
place, having all sorts of switch-like constructs is highly
undesirable (match, case, match-lambda etc. etc. etc.)

And, should the user not be in control of what equivalence
predicate he's using with (cond), (match), (match-lambda) etc.
Do we want to go the assoc/assv/assq way?

Pjotr.



_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports