in reply to Re^13: Accessing lexicals in other scopes dynamically by name
in thread Accessing lexicals in other scopes dynamically by name

Ok, thanks for the elaboration.

But why does a closure not simply have a pointer to the pad (thereby gaining access to all lexcials)?

  • Comment on Re^14: Accessing lexicals in other scopes dynamically by name

Replies are listed 'Best First'.
Re^15: Accessing lexicals in other scopes dynamically by name
by ikegami (Patriarch) on Aug 02, 2010 at 03:32 UTC
    Because it would be bad for this code to print "b" twice.