On 1/16/06, Larry Wall <[EMAIL PROTECTED]> wrote:
> Yes, at least for any block that really is capturing a closure.
> Perhaps we need to distinguish those from "accidentally" nested
> top-level functions.  But undecorated "sub" is more-or-less defined
> to be "our sub" anyway, just as with "package", "module", and "class"
> these days.  The only difference is that "our" explicitly introduces
> a lexically scoped alias, while the undecorated form presumably doesn't.
> Though we could break that too, I suppose.

What is the benefit for -not- explicitly introducing a lexically
scoped alias? Is there some performance reason why the undecorated
form wouldn't?

> : * If we insert a call to g() above without calling f() first, should it
> : assume an uninitialized $x, or throw an exception (Pugs currently does
> : the latter)?
>
> An exception is fine, modulo what I said about "accidental" nesting.
> When do you detect the condition?  If the inner function can't
> reference $x, does it still fail?  On the other hand, we can get into
> "eval" issues where it might or might not reference $x.  I'm okay
> with requiring lexical scopes to have some existing relationship
> with dynamic scopes, especially when we know some initialization is
> required.

What other forms would be useful other than "our sub g {...}"? If
they're useful, shouldn't they have keywords?

Rob

Reply via email to