[e-lang] Atomic expansion of MatchBindExpr to trinary-define
kpreid at attglobal.net
Thu May 11 17:59:59 EDT 2006
On May 1, 2006, at 1:46, Mark S. Miller wrote:
> Dean points out that if we give the trinary-define a syntax with a
> left-to-right order that matches its execution order, (e1, e2, p),
> then we can allow it to follow E's normal left-to-right scoping
> rules without restriction. At that point, we should be able to
> express MatchBindExpr as an expansion to trinary-define.
Is it truly necessary to provide left-to-right-define to support
this? Isn't (using the "into" syntax I just posted)
(def a := 1) into ^(fail) ==a
def specimen__1 := (def a := 1)
def ejector__2 := fail
def ==a := (specimen__1, ejector__2)
Not that we should actually perform this expansion, but that it is
possible to do the things we want without it.
That said, if we agree on a good syntax for left-to-right-define, I
would prefer to have it as the Kernel-E construct, and remove the
right-to-left trinary define syntax (e`def $a := ($b, $c)`) entirely.
I only want the reasons for its inclusion to be sound.
Kevin Reid <http://homepage.mac.com/kpreid/>
More information about the e-lang