[e-lang] scoping rules of when-catch

David Hopwood david.nospam.hopwood at blueyonder.co.uk
Sun Jul 23 09:30:14 EDT 2006


Mark S. Miller wrote:
> Kevin Reid wrote:
>>- Nontrivial patterns are a good reason to not kill the <pattern> in  
>>'when':
>>
>>     when (foo) -> _([bar :int, baz]) { ... bar ... baz ... }
> 
> when (foo) -> {
>      def [bar :int, baz] := foo
>      ... bar ... baz ...
> }
> 
> Seems at least as clear.

I agree.

> I continue to want to get rid of the explicit done function declaration. If we 
> do, and if we also accept pragma.enable("lambda-args") (described at 
> <http://www.eros-os.org/pipermail/e-lang/2005-August/010996.html> into 
> official E, then "when" can stop being built in syntax, and can instead be a 
> control abstraction defined in E. I find this appealing.

>From that message:

# This means that the user defined __if and __while constructs can properly
# simulate the built-ins (except that the built-in 'while' can magically
# bind __break and __continue, though the user-defined __while cannot).

What changes would be necessary to lambda-args to make exit constructs
like 'break' and 'continue', and similar constructs for user-defined
control abstractions, work correctly?

-- 
David Hopwood <david.nospam.hopwood at blueyonder.co.uk>




More information about the e-lang mailing list