Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21780 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76558 invoked by uid 1010); 3 Feb 2006 04:10:45 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 76543 invoked from network); 3 Feb 2006 04:10:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Feb 2006 04:10:45 -0000 X-Host-Fingerprint: 192.38.9.232 gw2.emini.dk Linux 2.4/2.6 Received: from ([192.38.9.232:2632] helo=gw2.emini.dk) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id BD/9F-41770-4C7D2E34 for ; Thu, 02 Feb 2006 23:10:44 -0500 Received: from foxbox (IGLD-84-228-50-112.inter.net.il [84.228.50.112]) by gw2.emini.dk (Postfix) with ESMTP id D7011A0FF9; Fri, 3 Feb 2006 05:10:39 +0100 (CET) Message-ID: <1b2701c62877$d1f9dbf0$6402a8c0@foxbox> Reply-To: "Steph Fox" To: "James Crane" , "php internals" References: <2a8d4a710601282225g4f06a6c7v59edb232eb9584a4@mail.gmail.com><2a8d4a710601291032g3e4b3b93i3f3edc5b19c66dc8@mail.gmail.com><23b513280601291046v24720f2bl28b0a88fadcc90be@mail.gmail.com><2a8d4a710601291220i5d33202ewabe9337d40043299@mail.gmail.com><2a8d4a710601291221q186165adwe780ca5f3ee253@mail.gmail.com><43DD2C76.4010402@album.co.nz><2a8d4a710601291316i3e46df6q51f8027deb4928b1@mail.gmail.com><2a8d4a710602021824l5f46a4aal5d33498cd0703ec4@mail.gmail.com><43E2C351.2010208@cschneid.com> <2a8d4a710602022005s4f6fe06die0a6ac721dafe19d@mail.gmail.com> Date: Fri, 3 Feb 2006 06:10:50 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Subject: Re: [PHP-DEV] PHP Array Literals From: steph@zend.com ("Steph Fox") OK, so 10 years into PHP suddenly we need a new way for people to understand arrays? I think what we have already is good enough. Speaking as an arts grad who came into coding late in life and learned C via PHP... - Steph ----- Original Message ----- From: "James Crane" To: "php internals" Sent: Friday, February 03, 2006 6:05 AM Subject: Re: [PHP-DEV] PHP Array Literals [Reply below] On 2/2/06, Christian Schneider wrote: > While I would kinda like array literals too (and even had a patch for it > some time ago, don't remember if it was without problems though) the > core developers think that > a) one working solution is enough > b) array() is easier to understand/lookup/teach than []. > > There are no "objective" arguments against it but you won't change their > mind by repeating your question ;-) > > Array literals have been proposed several times already and won't be > added to the language anytime soon. Not much you can do about it but > maintain your own patch if you really want it. > > - Chris Yeah, that wouldn't be a very good solution as the code is meant to be distributed. Those two reasons right there are indeed very good, and nobody's really expressed them so simply. If my desire for a simpler syntax wasn't so strong, I'd be compelled to give up just for these. But, here's a question: how easy is it to look up [] for accessing indexes of arrays? It's all within the arrays section of the documentation, no? So it would go right in there as well. And don't you think that understanding will be able to understand that []s access properties of an array and []s can also create these values (or, more logically, this value)? The same goes for teaching. To me, the only good excuse not to implement is that array() works, but that is a bit weak considering the idea of changes to a language (or addendums, really) is to evolve the language to be more usable, logical, consistent, intelligent, and easy to use. M.T. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php