guile-devel
[Top][All Lists]
Advanced

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

Re: Where the next effort in prolog will be and a cool match hack!!


From: Ludovic Courtès
Subject: Re: Where the next effort in prolog will be and a cool match hack!!
Date: Mon, 13 Sep 2010 14:20:56 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hi,

Alex Shinn <address@hidden> writes:

> The default matcher in Racket is extensible by dispatching
> on the first symbol in each list, so a pair is (cons a b) and a
> list would be (list a b c).  This is slightly more verbose, and
> looks like how you would generate the data rather than its
> actual structure, but at least is extensible.

That’s similar to what OCaml, Coq, Scala, & co. do.  The nice thing is
that it’s expressive and makes for an extensible matcher.

> It would be possible to build on Wright's syntax with a
> single hook, e.g. patterns of the form
>
>   (extended-match match-dispatcher data ...)
>
> possibly abbreviated
>
>   (: match-dispatcher data ...)
>
> where `match-dispatcher' is an extension macro following
> some CPS API.  A kludge, but perhaps better than
> redefining a matcher for every extension.

Sounds like a nice plan.  :-)

Thanks,
Ludo’.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]