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

Mark S. Miller markm at cs.jhu.edu
Thu May 4 12:13:13 EDT 2006


Mark S. Miller wrote:
> We don't currently have a concrete syntax for trinary-define which anyone 
> likes. For purposes of discussion, we're using the syntax
> 
>      e ::= keyword (e1, e2) =~ p
> 
> Perhaps, with an appropriate choice of keyword, this syntax will be just fine. 
> Suggestions?
 > [...] 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...

     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...



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

     Cheers,
     --MarkM



More information about the e-lang mailing list