Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21779 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73683 invoked by uid 1010); 3 Feb 2006 04:05:26 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 73667 invoked from network); 3 Feb 2006 04:05:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Feb 2006 04:05:26 -0000 X-Host-Fingerprint: 66.249.92.199 uproxy.gmail.com Received: from ([66.249.92.199:38529] helo=uproxy.gmail.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id D8/2F-41770-686D2E34 for ; Thu, 02 Feb 2006 23:05:26 -0500 Received: by uproxy.gmail.com with SMTP id j40so76654ugd for ; Thu, 02 Feb 2006 20:05:22 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=An6ywLWYLqQJJcRNVkL5c06bPpRpZQTUItvNb250miOijvkzzfejBFzzXDc8U2OsghAsr8kBC4DQgOZj52y2c478xgzs82qGERHVcu6RR5nIhghbvC7iV7kSCiAIWQ+8+irZ4JLHDnDYsCoeVygtx7Hri7ZRBWO1/HdKzmBZL+8= Received: by 10.49.33.17 with SMTP id l17mr365533nfj; Thu, 02 Feb 2006 20:05:22 -0800 (PST) Received: by 10.49.72.17 with HTTP; Thu, 2 Feb 2006 20:05:22 -0800 (PST) Message-ID: <2a8d4a710602022005s4f6fe06die0a6ac721dafe19d@mail.gmail.com> Date: Thu, 2 Feb 2006 23:05:22 -0500 To: php internals In-Reply-To: <43E2C351.2010208@cschneid.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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> Subject: Re: [PHP-DEV] PHP Array Literals From: chiology@gmail.com (James Crane) [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.