in reply to Re: closure clarity, please
in thread closure clarity, please
I believe [ the statement "Subs are global" ] should now be considered false.
The scope of something is the area from which that something can be seen. Subroutines can be seen from anywhere, so they are global.
On the other hand, the variables that a sub can see depends on the scope in which the sub is defined.
You're talking of the scope of the variables now, not the scope of the sub. Yes, they are visible to the sub. We gave a number of examples of this. You can't have closures without this.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: closure clarity, please
by 7stud (Deacon) on Nov 27, 2009 at 03:04 UTC | |
by ikegami (Patriarch) on Nov 27, 2009 at 03:14 UTC |