[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] [r6rs-discuss] [scheme-reports] Scheme pattern matching & R*RS
On 12/14/2010 09:39 AM, John Cowan wrote:
> Per Bothner scripsit:
>> The (default/preferred) syntax for lambda should do pattern-matching
>> *without* having to use a verbose name like match-lambda*. I don't
>> want either of these:
>> (1) People learning and using Scheme having to mix 2 sets of
>> keywords depending on whether they want to use pattern-matching.
>> (2) Having to use keywords that are *even more* verbose than R6RS.
> I quite agree. However, I don't think it's too great an imposition
> to ask people to write (import (scheme patterns)) at the top of their
> code in order to get pattern-matching lambda, define, let, let*, etc.
It is tolerable, and may be the only solution for R7RS. However,
it is inconvenient and problematical (see below). Perhaps we can
consider having it part of the standard (rnrs (7)) library?
And/or positioning it for being the default in R8RS?
> That disposes of your point 2, and I don't understand your point 1
> unless it is another way of stating your point 2. Are you objecting
> to syntactic keywords having different significance in different parts
> of the code?
Yes. This is likely to lead to confusion. Imagine looking for the
specification of lambda. You find it in the core-specification,
but it doesn't support patterns, so you get confused. With some
extra searching and luck, you might find the specification of the
patterns library, but now you have two places to read and understand.
Also consider a Scheme tutorial. Do they use the pattens version of
lambda? That would be my hope, but they may decided to start with
the non-patterns version because it is more standard and requires
And of course we have WG1 vs WG2 situation. So we have to
delegate patterns to an optional library for R7RS, but it is
definitely a poor long-term solution.
Scheme-reports mailing list