Re: [VOTE] Uniform Variable Syntax
| From: | Laruence | Date: | Mon, 07 Jul 2014 15:03:18 +0000 |
| Subject: | Re: [VOTE] Uniform Variable Syntax | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-75317@lists.php.net to get a copy of this message | ||
Hey:
On Mon, Jul 7, 2014 at 10:46 PM, Andrea Faulds <ajf@ajf.me> wrote:
>
> 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.
I've change my opinion.....
I will vote for yes...
thanks
> --
> Andrea Faulds
> http://ajf.me/
>
>
>
>
--
Laruence Xinchen Hui
http://www.laruence.com/