in reply to Re^7: Unable to declare local variable with "use strict".
in thread Unable to declare local variable with "use strict".
Any block that creates scoped variables is a closure in my book.So, only blocks that don't create scoped variables aren't not closures? That's not a very useful definition. It's also a definition that's quite different from what other people use. Using your own definitions doesn't promote communication.
Note that the important thing of what the rest of Perl world calls closures is the reference to lexical variables defined outside of the scope. The block rovf showed, and which you label a 'closure' doesn't reference a variable outside of its scope.
Are you saying that everyone who creates a class has to build a potentially exhaustive set of classes and subclasses so that no one can see things that don't belong to them?Uhm, not at all. I commented on the technique rovf showed. I say it doesn't scale. What makes you think I promote that?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Unable to declare local variable with "use strict".
by ikegami (Patriarch) on Mar 29, 2010 at 20:27 UTC | |
by JavaFan (Canon) on Mar 29, 2010 at 21:05 UTC | |
by ikegami (Patriarch) on Mar 29, 2010 at 21:31 UTC | |
|
Re^9: Unable to declare local variable with "use strict".
by doug (Pilgrim) on Mar 30, 2010 at 09:24 UTC |