[e-lang] Searching for a keyword (was: Atomic expansion of MatchBindExpr to trinary-define)
Kevin Reid
kpreid at attglobal.net
Thu May 4 19:02:06 EDT 2006
On May 4, 2006, at 12:13, Mark S. Miller wrote:
> 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
>
> This is probably a crazy idea, but how about "given"?
>
> given foo =~ [a,b] # Given that foo matches [a,b] ...
> ...a...b...
(This would be ambiguous with MatchBindExpr.)
> 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...
I mostly like the way it reads, but it is strange.
--
Kevin Reid <http://homepage.mac.com/kpreid/>
More information about the e-lang
mailing list