Re: Re: [RFC] [VOTE] Short Closures
| From: | Jordi Boggiano | Date: | Thu, 24 Sep 2015 13:08:14 +0000 |
| Subject: | Re: Re: [RFC] [VOTE] Short Closures | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-88474@lists.php.net to get a copy of this message | ||
On 24/09/2015 07:39, Marco Pivetta wrote:
- I'm still conflicted on automatically importing all of the scope into the closure: while it is working for functional languages, that's where most of the headaches come from in languages such as javascript.The automatic import IMO isn't as much an issue as in JS, because it imports by value and not by reference as is done in JS. If you do $foo = 'bar'; in your closure and suddenly someone in the outer scope defines $foo as well, you aren't going to overwrite that outer scope value. Therefore the risks for interferences are reduced quite a bit. Cheers -- Jordi Boggiano @seldaek - http://seld.be