in reply to Re: Re: Re: Why does Perl use dynamic scoping?
in thread Why does Perl use dynamic scoping?
Yeah I can see your point. But as you said most of the other ways are inconvient and inefficient, not to mention less flexible. For instance perlfunc:caller provides a way to determine if you have been called below a given sub, just walk the stack and see, but it would be slow and clumsy. Also in addition to your last point localization provides the benefit of applying to blocks and not just subs.
As adrianh said, I dont want globals or dynamic scoping often, but when I want them I want them there. :-)
Minor typographical changes were made to this node after it was posted.
--- demerphq
my friends call me, usually because I'm late....
|
|---|