On Tue, 04 Sep 2001 18:38:20 -0400, Dan Sugalski wrote:

>At 09:20 AM 9/5/2001 +1100, Damian Conway wrote:
>>The main uses are (surprise):
>>
>>         * introducing lexically scoped subroutines into a caller's scope
>
>I knew there was something bugging me about this.
>
>Allowing lexically scoped subs to spring into existence (and variables, for 
>that matter) will probably slow down sub and variable access, since we 
>can't safely resolve at compile time what variable or sub is being 
>accessed.

Eh... isn't the main use for this, in import()? That's still compile
time, isn't it?

So you optimize it for compile time. Once compile time is over, the
lexical variables table is frozen. If you want to add more stuff at 
runtime, it'll cost you.

BTW if you add new variables at the back of the table, I don't see how
any old references to existing variables would be compromised.

-- 
        Bart.

Reply via email to