Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55772 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22805 invoked from network); 10 Oct 2011 09:55:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Oct 2011 09:55:56 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@googlemail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.215.170 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@googlemail.com X-Host-Fingerprint: 209.85.215.170 mail-ey0-f170.google.com Received: from [209.85.215.170] ([209.85.215.170:36395] helo=mail-ey0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/23-04654-A21C29E4 for ; Mon, 10 Oct 2011 05:55:54 -0400 Received: by eyg7 with SMTP id 7so1073955eyg.29 for ; Mon, 10 Oct 2011 02:55:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=w5gJKICYFdCBN/wkQkthonSWO2viW7qzyQ9DbV/o5R4=; b=Lg/0kc+fEiPC/V3byjVD2R3Mv3U9SC/2h8auLtkmMCjSc8ie5hWVOe9Ny17zOVnsx5 lGrlcQqeUDN53RT/R2zYfwnnzJ2C8g9D6Q0++sarl3CWIaCJ01/Mtiev6/jWAQOM+Ny+ M53W4TaPri0GI2M2+SUUHtRSUq+f/T/Hwc6RY= MIME-Version: 1.0 Received: by 10.14.0.204 with SMTP id 52mr1493605eeb.64.1318240548226; Mon, 10 Oct 2011 02:55:48 -0700 (PDT) Received: by 10.14.99.205 with HTTP; Mon, 10 Oct 2011 02:55:48 -0700 (PDT) In-Reply-To: References: Date: Mon, 10 Oct 2011 11:55:48 +0200 Message-ID: To: Ferenc Kovacs Cc: Peter Cowburn , PHP internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] Array dereferencing using alternative array syntax From: nikita.ppv@googlemail.com (Nikita Popov) On Mon, Oct 10, 2011 at 11:03 AM, Ferenc Kovacs wrote: > the alternate syntax has a rough past (if I remember correctly, [] was > mentioned to be deprecated, then with 5.3 the preference was switched: > [] is the preferred way now, and {} got almost deprecated), so if we > plan to support the {} syntax on long term, I'm +1 for adding this to > the language. > I we plan to remove it eventually, then imo it is better to not > introduce the support for the alternative syntax. Imho it should be supported regardless of whether we want to remove it or not - for the sake of consistency. I'm all for getting rid of the alternative syntax (especially because it gets more and more convoluted as the language evolves: you might still understand $str{1}, but func(){1} looks more like some strange lambda than a string offset access), but I think that for the several years that we will definitely still support the alternative syntax (as removal of features in PHP usually takes decades) it should be supported fully. Nikita