(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 pattern matching: the case for (case) Peter Kourzanov (21 Dec 2010 23:25 UTC)

Re: [Scheme-reports] [r6rs-discuss] Scheme pattern matching: the case for (case) Peter Kourzanov 21 Dec 2010 23:25 UTC

On Tue, 2010-12-21 at 17:54 -0500, John Cowan wrote:
> Peter Kourzanov scripsit:
> > I have no quoting in my example clauses. Read it as follows:
>
> No, but case implicitly quotes its arguments, which makes it impossible
> (or rather useless) for them to be quasiquotations.
>

What I am proposing is to generalize quotation in (case) to be
quasiquotation (I hope we do agree that quasiquote is more general
than quote). Then one can add pattern matching by hooking onto
unquote (-splicing) for delineating pattern variables.

> > (case 'b
> >    ((`,a) (list a))) ; explicate quasiquote
>
> That still won't work.  (` ,a) is just (quasiquote (unquote a)), and in
> the context of a case key means "either the symbol quasiquote, or the list
> (unquote a which is eqv? to the one in the code".

I think you missed a level of parentheses;-) `,a is here just 1
alternative...

If I read any modern R*RS spec, I see no possibility to use unquote in
regular (case) clauses. (eqv? datum ',a) is doomed to be #f for all
data, including ',a (because the ',a in the clause is always newly
allocated), except, possibly, in the unlikely case that a compiler
would stash all occurrences of ',a and the like into one single machine
value/location.

So there is no use-case for this counter-example. In my interpretation,
the clause would match just any datum, with quasiquote elided and
unquote being syntax to delineate pattern variables.

Please correct me if I'm wrong but I see no problem whatsoever in
supporting original (case) semantics alongside pattern-matching
semantics.

Regards,

Pjotr

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