[e-lang] scoping rules of when-catch
Mark Miller
erights at gmail.com
Wed May 31 20:41:56 EDT 2006
On 5/31/06, Kevin Reid <kpreid at mac.com> wrote:
> On May 31, 2006, at 17:26, Mark Miller wrote:
>
> > <funcHeader> ::= <ident> ( <pattern>* ) <optGuard>
>
> What was the original reason for its inclusion?
The main one was FQN-based upgrade. The other was that I was
uncomfortable reasoning about the type of p in
when (p) -> { ... p ... }
as being resolved within the when-closure, but unresolved outside the
when-closure. By contrast, in
when (p) -> done(i) { ... i .... }
we can think of i as having the type that p resolves to. My intuition
was that separate types should be associated with separate variables.
--
Text by me above is hereby placed in the public domain
Cheers,
--MarkM
More information about the e-lang
mailing list