Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37944 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53935 invoked from network); 28 May 2008 07:12:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 May 2008 07:12:11 -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:45731] helo=daylessday.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3E/A5-15519-AC50D384 for ; Wed, 28 May 2008 03:12:11 -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 E18A4640089; Wed, 28 May 2008 11:12:07 +0400 (MSD) Message-ID: <483D05B6.30804@daylessday.org> Date: Wed, 28 May 2008 11:11:50 +0400 User-Agent: Thunderbird 2.0.0.12 (X11/20080226) MIME-Version: 1.0 To: Rasmus Lerdorf CC: 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> In-Reply-To: <483CFF33.6060302@lerdorf.com> Content-Type: text/plain; charset=windows-1251; 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 10:44, Rasmus Lerdorf wrote: > Today's web developer is > typically writing half their app in some variety of Ecmascript, either > Javascript or Actionscript and this array syntax is second nature to all > those folks. I don't recall any languages to introduce new syntax because it's so handy to those who come from PHP and I see no reasons for us to do it either. I perfectly understand that we (well, you) did it many times in the beginning, but I believe that time is now gone. The array syntax we have exists for many years and is used in gazillions lines of code, it's known to every developer who have ever seen a PHP script. In the same time, the [] syntax will definitely confuse people (wth? this surely looks like invalid syntax!) and will only help to those how don't 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%. 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? */ -- Wbr, Antony Dovgal