[ Please ignore this post and read Re^7: Unable to declare local variable with "use strict". instead ]
Are you saying he shouldn't call it a closure because (you say) it's not the general or typical example?
The code featured functions that captures a variable beyond it's normal scope. They are very much closures.
It's really not that atypical either. It happens whenever you have module-level lexicals. The lexicals would normally fall out of scope when the module finished executing when it's loaded, but they survive thanks to the methods that capture them.
The only difference between named and unnamed subs is when the capture occurs. Named subs are instantiated at compile-time, so they capture at compile-time. Unnamed subs are instantiated at run-time, so they capture at run-time.
In reply to Re^7: Unable to declare local variable with "use strict".
by ikegami
in thread Unable to declare local variable with "use strict".
by mr_p
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |