[e-lang] Searching for a keyword (was: Atomic expansion of MatchBindExpr to trinary-define)

Darius Bacon darius at accesscom.com
Thu May 4 16:02:52 EDT 2006


"Mark S. Miller" <markm at cs.jhu.edu> wrote:
>  > [...] Left-to-right trinary define indeed looks like the
>  > better construct to put into Kernel-E. We still need a good syntax for
>  > it.
> 
> 
> This is probably a crazy idea, but how about "given"?
> 
>      given foo =~ [a,b]        # Given that foo matches [a,b] ...
>      ...a...b...

When I wanted a plain-English word for 'lambda', 'given' was what I
came up with -- reading (lambda (x) (= x 0)) as "Given x, is x
zero?". This conflicting meaning isn't exactly in widespread use in
other programming languages, but it is how I started to read "given
foo".

Maybe 'provided' instead? But that's just a latinate synonym.

Darius

>      given (foo,ej) =~ [a,b]   # Given that foo matches [a,b] ...
>      ...a...b...               # (But if it can't, complain to ej)
> 
>      if (foo) =~ [a,b] {       # If foo matches [a,b], then ...
>          ...a...b...


More information about the e-lang mailing list