On 07/07/2014 16:54, Laruence wrote:
> 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.
> then we won't need to temporarily fix it..
>
> anyway, it's just my 2 cents
While I deeply agree with you (introducing something we will need to fix
later is not a good idea), this RFC fixes a lot of real, concrete and
immediate issues that are blocking for the emergence of new tools (for
example, a grammar of PHP that can be used by AST-compliant tools).
Moreover, it defines a clear base for the semantics of variables. Known
issues are well-spotted and define the very next steps of the work.
Parentheses are interpreted in various ways according to the language
and the area. Thus, a lot of (smart and calm) discussions will be
required. However, this RFC is targeting PHP6 (and not 7… just kidding…
or not… o_O), so we have time to fix the next spotted issues before the
final release. Let's cut the giant task into small ones. I think this is
the approach of Nikita since he has honestly exposed the known issues.
Cheers :-).
--
Ivan Enderlin
Developer of Hoa
http://hoa-project.net/
PhD. student at DISC/Femto-ST (Vesontio) and INRIA (Cassis)
http://disc.univ-fcomte.fr/ and http://www.inria.fr/
Member of HTML and WebApps Working Group of W3C
http://w3.org/