Re: [VOTE] Uniform Variable Syntax
On 7 Jul 2014, at 15:42, Laruence <laruence@php.net> wrote:
> 1. "The current patch introduces a new “write context” issue. Namely
> ($foo)['bar'] = 'baz' will not behave this same was as
> $foo['bar'] =
> 'baz'. In the former case an undefined variable notice will be thrown
> if $foo does not exist, whereas the latter does not throw a notice."
>
> 2. "As these changes only apply to some very rarely used syntax, the
> breakage seems acceptable for PHP 6."
>
>
> I don't think we should introduce a new thing which is not perfect or
> "confused".. it looks like we fixed a mess with a new mess.
>
> it make me think we should : "don't fix it until it is broken”
We are fixing what is broken here; the variable syntax is counter-intuitive at the moment, and they
make the syntax more consistent overall.
Also, parentheses in PHP are always a source of issues. I don’t think they’ll ever quite work
properly unless we switch to using an AST-based parser someday.
--
Andrea Faulds
http://ajf.me/
Thread (18 messages)