Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52723 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53447 invoked from network); 1 Jun 2011 22:39:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jun 2011 22:39:04 -0000 Authentication-Results: pb1.pair.com smtp.mail=kontakt@beberlei.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=kontakt@beberlei.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain beberlei.de from 178.77.98.152 cause and error) X-PHP-List-Original-Sender: kontakt@beberlei.de X-Host-Fingerprint: 178.77.98.152 lvps178-77-98-152.dedicated.hosteurope.de Linux 2.6 Received: from [178.77.98.152] ([178.77.98.152:54953] helo=beberlei.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 56/59-32367-68FB6ED4 for ; Wed, 01 Jun 2011 18:39:03 -0400 Received: by beberlei.de (Postfix, from userid 33) id 18B706E09124; Thu, 2 Jun 2011 00:38:58 +0200 (CEST) To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Thu, 02 Jun 2011 00:38:58 +0200 In-Reply-To: <3C4EC449-1013-4ED6-9113-F37FAEBD0566@seancoates.com> References: <3C4EC449-1013-4ED6-9113-F37FAEBD0566@seancoates.com> Message-ID: <74ebd94e17bc5a1758a8887d214edde1@mysqlusers.de> X-Sender: kontakt@beberlei.de User-Agent: Roundcube Webmail Subject: Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux) From: kontakt@beberlei.de (Benjamin Eberlei) On Wed, 1 Jun 2011 10:27:36 -0400, Sean Coates wrote: > This discussion seems to lack real-world examples… > > Derick wrote: >> I'm still -1 on it. It makes absolutely unreadable code (yes, also >> in >> JavaScript with f.e. MongoDB). > > > Here's an actual snippet from my production code (which interfaces > with ElasticSearch): > http://paste.roguecoders.com/p/0747f2363c228a09e0ddd6f8ec52f2e8.html > > If you consider this readable, you're fare more literate than I will > ever be (-: > Imho, this example just lacks a good OO abstraction (Query Builder) that has a toMongoQueryArray() method. > … > > Gustavo wrote: > >> $a[array()]; >> >> is much more clear than >> >> $a[[]] > > Anyone who considers themselves skilled enough to participate in a > language-forming discussion like this one should also have the > prerequisite ability to determine that using an [empty] array as an > array key is a horrible idea, and they deserve whatever weirdness > ensues. IMO. > > S