Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37948 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60911 invoked from network); 28 May 2008 07:33:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 May 2008 07:33:32 -0000 Authentication-Results: pb1.pair.com smtp.mail=tony@daylessday.org; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tony@daylessday.org; sender-id=pass Received-SPF: pass (pb1.pair.com: domain daylessday.org designates 89.208.40.236 as permitted sender) X-PHP-List-Original-Sender: tony@daylessday.org X-Host-Fingerprint: 89.208.40.236 mail.daylessday.org Linux 2.6 Received: from [89.208.40.236] ([89.208.40.236:50047] helo=daylessday.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2B/17-15519-9CA0D384 for ; Wed, 28 May 2008 03:33:30 -0400 Received: from [192.168.1.34] (ppp91-78-105-211.pppoe.mtu-net.ru [91.78.105.211]) by daylessday.org (Postfix) with ESMTP id E6833640089; Wed, 28 May 2008 11:33:26 +0400 (MSD) Message-ID: <483D0AB5.9030400@daylessday.org> Date: Wed, 28 May 2008 11:33:09 +0400 User-Agent: Thunderbird 2.0.0.12 (X11/20080226) MIME-Version: 1.0 To: Alexey Zakhlestin CC: Rasmus Lerdorf , internals@lists.php.net References: <0412F6FE505049F7901EAB8C61774839@pc> <87.77.15519.9E47C384@pb1.pair.com> <97.F8.15519.1229C384@pb1.pair.com> <483CF9E9.2010803@daylessday.org> <483CFAE0.203@zend.com> <483CFBAB.8030400@daylessday.org> <483CFF33.6060302@lerdorf.com> <483D05B6.30804@daylessday.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Short syntax for array literals [...] From: tony@daylessday.org (Antony Dovgal) On 28.05.2008 11:24, Alexey Zakhlestin wrote: >> know PHP, but have a certain experience with *script languages, i.e. you're >> going to do a favor for 1% and confuse the remaining 99%. > > percentage is way different. such "short array syntax" is a common > ground for a lot of modern dynamic languages. People who do not know PHP and come from *script languages are surely NOT the majority and I daresay their number is infinitely smaller than the number of people who know array() syntax by heart. >> And at last, but not least I don't see anything "more readable and >> maintainable" in using square brackets to initialize arrays when the same >> brackets are used to access them: >> >> $a = [$a[1][2], 3]; /* wth does this mean? */ > > initialize variable $a as array, with elements: > 0) value-of-key "2" of array located at key "1" of old array $a > 1) 3 > > difficult to "spell", but easy to understand Will you spell it for me each time I stumble upon such a "readable" construct, pretty please? -- Wbr, Antony Dovgal