[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [r6rs-discuss] [Scheme-reports] returning back to pattern matching
On Thu, 2010-12-23 at 14:33 -0800, Vincent Manis wrote:
> So, please:
> 1. small, clean, core language, with a modest number of extensions to
> existing standards (though, I hope, nothing that is an extension to
> existing practice).
Then we should have stopped at R4RS and declared it the ultimate Scheme,
which is the point where some important implementations have stopped.
> I am very optimistic that the current process will lead to these
> objectives being satisfied, but still want to encourage the
> participants to focus on creating a language that will sharply
> increase the willingness of programmers, educators, and others to
> adopt Scheme. That's what really matters.
>From my experience the lack of pattern matching, not even dynamic typing
anymore, that is the feature that makes many people go Haskell or ML.
That is sad to see, especially in an otherwise powerful language that
advocates program-as-data philosophy, yet at the same time permeates
half-baked solutions like (define (x y . z)), case/eqv?, case-lambda and
let-values... THAT does sound like piling feature upon feature upon
Shifting the problem to the libraries only marginalizes it, leaving the
users at the mercy of reinventing all the stuff they get for free in
other languages, all the time when they want to do something just a
little bit different from what the standard is supposed to be intending
(e.g., case using other equivalence predicates).
P.S. Please take a look at some of the code that gets generated by
existing pattern matchers and imagine having to write out all of that
code explicitly... (I have given some examples of how succinct Scheme
with pattern matching can be somewhere at the beginning of this thread)
Or imagine porting an optimized pattern matcher from one system to
another. You're lucky if both support syntax-case. You're less lucky
if they only support syntax-rules. And otherwise you have to pre-process
all your files separately by R4RS implementation of some macro expander.
P.P.S. Lets have proper pattern matching as an extension of (case) and
all core language binding forms (lambda, let & co) or none at all.
Half-baked solutions, as you rightfully said, already work (for me, at
r6rs-discuss mailing list