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

Re: [Scheme-reports] [r6rs-discuss] need to overload (case) for pattern-matching

On Tue, 2010-12-14 at 12:39 -0500, 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.

BTW, we also need to overload (case) to do pattern matching, as it 
clearly has added value (disjunctions) over (let) based match
functions, which assure that all patterns are matched to evaluate 
the body. But its already library syntax in R6RS I see :-)


Scheme-reports mailing list