Re: Re: [RFC][Discuss] Arrow Functions
| From: | Andrea Faulds | Date: | Tue, 31 Jan 2017 20:45:02 +0000 |
| Subject: | Re: Re: [RFC][Discuss] Arrow Functions | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-98091@lists.php.net to get a copy of this message | ||
Hi Marc,
Marc Bennewitz wrote:
- Also I like the "use" keyword you have to define your variables
-> Would it be helpful to allow "function () use (*) {}" to inline
all available variables?
I did think of that, but it's not as concise as not having to specify use at all. You could take the opposite approach and auto-capture by default, but permit use () to capture nothing, alongside regular `use (...)` for explicit capture of variables.
Thanks.
--
Andrea Faulds
https://ajf.me/