Dmitry Stogov escreveu:
I don't like "lexical" keyword, because it can be used anywhere in
function (e.q. inside "if" or loop statement), however lexical variables
must be the part of lambda function definition.
I agree with Dmitry: Lexical variables belong to lambda function
definition. It makes more sense to me. But I also agree that the
proposed syntax might be a little misleading.
We can think about some better syntax, like
function ($x, $y) ($a, $b, $c) {};
This looks better
function ($x, $y) [$a, $b, $c] {};
Array confusion is to be expected with this syntax, I don't like it.
FWIW, I'd like to see this on 5.3.
regards
Rodrigo Saboya
I like "|" separator more, but the syntax of definition is not so
important for me. It just must be clean, and the "lexical" keyword
doesn't provide clean definition.
I don't like the idea to add methods at runtime, as it can break shared
data structures in multi-threaded environment.
Thanks. Dmitry.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php