Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75319 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47548 invoked from network); 7 Jul 2014 15:11:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Jul 2014 15:11:54 -0000 Authentication-Results: pb1.pair.com smtp.mail=ivan.enderlin@hoa-project.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ivan.enderlin@hoa-project.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain hoa-project.net from 95.130.10.56 cause and error) X-PHP-List-Original-Sender: ivan.enderlin@hoa-project.net X-Host-Fingerprint: 95.130.10.56 host1.ip6-networks.net Received: from [95.130.10.56] ([95.130.10.56:38161] helo=host1.ip6-networks.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 85/B0-44309-6B8BAB35 for ; Mon, 07 Jul 2014 11:11:52 -0400 Received: from host1.ip6-networks.net (localhost [127.0.0.1]) by host1.ip6-networks.net (Postfix) with ESMTP id 2308860C21 for ; Mon, 7 Jul 2014 17:11:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=hoa-project.net; h= message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; s=dkim; bh= g5EHD8RFKurdYkZVnQq12pZcM6FL45TNyE874zy7IOU=; b=Mu6RiX1OfpTPNQLB QYhEnWRuJw18PUjA6c5/RoALfTN9ajdEgzDz6quLytCrw7stir4HRaBYxNgSf31d 08lL5m+FclLRmZL+rtemq7tEmalCPhSTrCavPoijBFHXVKxOFo9BcdijYzo/SKqv 7npzdy9VSdANCO4T8Z+eTTG+wCc= Received: from Hwhost2.local (5-40.0-85.cust.bluewin.ch [85.0.40.5]) by host1.ip6-networks.net (Postfix) with ESMTPSA id 93FD860AA1 for ; Mon, 7 Jul 2014 17:11:46 +0200 (CEST) Message-ID: <53BAB8B0.5080208@hoa-project.net> Date: Mon, 07 Jul 2014 17:11:44 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: internals@lists.php.net References: <4BB5E7E4-BCED-4271-BECC-804A1EDD4E53@ajf.me> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [VOTE] Uniform Variable Syntax From: ivan.enderlin@hoa-project.net ("Ivan Enderlin @ Hoa") On 07/07/2014 16:54, Laruence wrote: > On Mon, Jul 7, 2014 at 10:46 PM, Andrea Faulds wrote: >> On 7 Jul 2014, at 15:42, Laruence wrote: >> >>> 1. "The current patch introduces a new =E2=80=9Cwrite context=E2=80=9D= issue. Namely >>> ($foo)['bar'] =3D 'baz' will not behave this same was as $foo['bar'] = =3D >>> '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=E2=80=9D= >> We are fixing what is broken here; the variable syntax is counter-intu= itive at the moment, and they make the syntax more consistent overall. >> >> Also, parentheses in PHP are always a source of issues. I don=E2=80=99= t think they=E2=80=99ll ever quite work properly unless we switch to usin= g 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=20 immediate issues that are blocking for the emergence of new tools (for=20 example, a grammar of PHP that can be used by AST-compliant tools).=20 Moreover, it defines a clear base for the semantics of variables. Known=20 issues are well-spotted and define the very next steps of the work.=20 Parentheses are interpreted in various ways according to the language=20 and the area. Thus, a lot of (smart and calm) discussions will be=20 required. However, this RFC is targeting PHP6 (and not 7=E2=80=A6 just ki= dding=E2=80=A6=20 or not=E2=80=A6 o_O), so we have time to fix the next spotted issues befo= re the=20 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 :-). --=20 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/