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


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to