Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:34731 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41453 invoked by uid 1010); 11 Jan 2008 15:06:55 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 41437 invoked from network); 11 Jan 2008 15:06:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2008 15:06:55 -0000 X-Host-Fingerprint: 195.16.58.126 unknown Received: from [195.16.58.126] ([195.16.58.126:10737] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D5/8A-09267-D0687874 for ; Fri, 11 Jan 2008 10:06:53 -0500 Message-ID: To: internals@lists.php.net Date: Fri, 11 Jan 2008 18:06:52 +0300 Reply-To: antonov@tessart.ru Organization: TESSART Adversting Group User-Agent: Thunderbird 2.0.0.9 (X11/20071031) MIME-Version: 1.0 References: <1A1C5E07-4057-4A36-8406-B0FB8BA14185@googlemail.com> In-Reply-To: <1A1C5E07-4057-4A36-8406-B0FB8BA14185@googlemail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 195.16.58.126 Subject: Re: [PHP-DEV] [RFC] Square brackets shortcut From: idler@instanceof.ru (Max Antonov) >> a) Commit square bracket array shortcut patch >> keys and values are separated by colons. >> ( http://www.opendogs.org/pub/php-5.3dev-080109-sbar.patch ) >> e.g. >> $a = [1, 2, 3]; >> $b = ['foo': 'orange', 'bar': 'apple', 'baz': 'lemon']; > > Breaks from PHP's => for no apparent reason (one character too many > character this time?), which is just confusing (that's an implicit -1). > >> b) Commit square bracket array shortcut patch >> keys and values are separated by double arrows. >> ( http://www.opendogs.org/pub/php-5.3dev-080109-sbar2.patch ) >> e.g. >> $a = [1, 2, 3]; >> $b = ['foo' => 'orange', 'bar' => 'apple', 'baz' => 'lemon']; > > Breaks backwards compatibility to save typing five characters. See > above. -1. > >> c) Reject and keep using `array()'. >> e.g. >> $a = array(1, 2, 3); >> $b = array('foo' => 'orange', 'bar' => 'apple', 'baz' => 'lemon'); > > For all the above reasons, +1. In my post i not write about variant "a)" +1 too.