Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27803 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64753 invoked by uid 1010); 5 Feb 2007 11:34:13 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 64738 invoked from network); 5 Feb 2007 11:34:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2007 11:34:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=M.Ford@leedsmet.ac.uk; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=M.Ford@leedsmet.ac.uk; sender-id=pass Received-SPF: pass (pb1.pair.com: domain leedsmet.ac.uk designates 160.9.128.18 as permitted sender) X-PHP-List-Original-Sender: M.Ford@leedsmet.ac.uk X-Host-Fingerprint: 160.9.128.18 mrelay-c.lmu.ac.uk Linux 2.4/2.6 Received: from [160.9.128.18] ([160.9.128.18:16507] helo=mrelay-c.lmu.ac.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 61/64-18726-43617C54 for ; Mon, 05 Feb 2007 06:34:13 -0500 Received: from localhost.lmu.ac.uk ([127.0.0.1] helo=localhost) by mrelay-c.lmu.ac.uk with esmtp (Exim 4.43) id 1HE23A-0001JZ-Tn for internals@lists.php.net; Mon, 05 Feb 2007 11:30:21 +0000 Received: from mrelay-c.lmu.ac.uk ([127.0.0.1]) by localhost (mrelay-c [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 04265-03 for ; Mon, 5 Feb 2007 11:30:13 +0000 (GMT) Received: from leedsmet-exch1.leedsmet.ac.uk ([160.9.35.117]) by mrelay-c.lmu.ac.uk with esmtp (Exim 4.43) id 1HE21j-0001GO-6M for internals@lists.php.net; Mon, 05 Feb 2007 11:28:51 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Mon, 5 Feb 2007 11:29:52 -0000 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array thread-index: AcdIjJEplyM6r/JQQRiCD1dq07LaJAAivKqg To: X-Virus-Scanned: by McAfee at Leeds Metropolitan University Subject: RE: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array From: M.Ford@leedsmet.ac.uk ("Ford, Mike") On 04 February 2007 18:38, Edin Kadribasic wrote: > Lukas Kahwe Smith wrote: > > Yes, you will come across it if its added. > > I find the Javascript syntax confusing to read as well. However more > > importantly I do not see the point in adding this sugar to save 5 > > chars.=20 >=20 > Nested arrays become very unreadable with the current PHP syntax. I > think killing those 5 chars per array would actually make thing more > readable.=20 >=20 >=20 > I don't find: >=20 > $a =3D [1 =3D> ['pears', 'apples'], 2 =3D> ['juice', 'oranges']]; >=20 > any less readable than: >=20 > $a =3D array(1 =3D> array('pears', 'apples'), 2 =3D> array('juice', > 'oranges'));=20 >=20 > Quite the opposite actually :) Me too - I go beyond Edin on this one, as I find the array() version actual= ly quite UNreadable and I have difficulty picking out what the individual a= rrays are; conversely, the [] version I take in at a glance. Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: m.ford@leedsmet.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211=20 To view the terms under which this email is distributed, please go to http:= //disclaimer.leedsmet.ac.uk/email.htm