On Thu, Apr 12, 2012 at 7:38 PM, Robert Williams <rewilli...@thesba.com> wrote:
> Also, remember that the closure is in fact another function, a function
> that performs its own actions independent of the parent. Just as other
> functions can pick whatever parameter names make the most sense to them
> internally, I think it makes sense to allow closures to pick whatever
> used-variables names make the most sense to them internally. It's
> certainly not a requirement, but used judiciously, I think it can
> definitely lead to easier-to-read (i.e., easier-to-maintain) code since it
> means variables can be named to best reflect their usage in both parents
> and closures.
Thanks, this is convincing.

The only thing I'm not really sure about then is whether it is a good
idea to allow importing $this using an alias. As $this is already
available by default I don't see much point in allowing it. It's
somewhere between useless and confusion.

Nikita

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to