[e-lang] Killing the MatchBindExpr

Mark Miller erights at gmail.com
Wed May 3 14:16:37 EDT 2006


On 5/3/06, Kevin Reid <kpreid at attglobal.net> wrote:
> This [if-match] trivially expands to the previously discussed left-to-right-
> kernel-define, which I think is an appropriate and widely useful
> primitive:
>
>    escape fail__1 {
>      define (e1, fail__1) =~ p1
>      e2
>    } catch _ {
>      e3
>    }
>
> Therefore, since "if-match" is unexpressive by discarding the
> exception, and can't replace all trinary-defines even if that were
> fixed, I think it should not be part of Kernel-E.

Good. I agree. Left-to-right trinary define indeed looks like the
better construct to put into Kernel-E. We still need a good syntax for
it.


> [if-match] might well be a
> worthwhile nonkernel construct, however, even replacing the nonkernel
> match-bind we discussed.
>
> If a review of existing code shows that all uses of match-bind can be
> rewritten into if-match or trinary-define, then I would be in favor
> of replacing match-bind with nonkernel if-match.

I'll try some more examples and post any surprises I encounter.

--
Text by me above is hereby placed in the public domain

    Cheers,
    --MarkM



More information about the e-lang mailing list