Re: [RFC] Closures, Lambdas and use
| From: | troels knak-nielsen | Date: | Mon, 05 Jan 2009 10:48:35 +0000 |
| Subject: | Re: [RFC] Closures, Lambdas and use | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-42482@lists.php.net to get a copy of this message | ||
On Sun, Jan 4, 2009 at 10:05 PM, Larry Garfield <larry@garfieldtech.com> wrote:
> $f = function($a, &$b) use ($y, &$z) global ($x, &$w) {
It would still leave the "static" keyword as an outlier. It wouldn't
make sense to declare a static by-ref.
Another problem with this, is that "use" and "global" doesn't match
conceptually. To make sense, we would have to rename "use" to
something like "lexical" (I think we had that discussion a year ago).
With the current proposed syntax, that isn't as much of a problem,
because the syntactic placement of "use" helps you to understand its
meaning..
--
troels