Re: Re: RFC: Short syntax for Arrays (redux)
| From: | Herman Radtke | Date: | Wed, 01 Jun 2011 16:32:20 +0000 |
| Subject: | Re: Re: RFC: Short syntax for Arrays (redux) | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-52685@lists.php.net to get a copy of this message | ||
>> 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 (-:
>
> Using JSON syntax would only "maybe" make it more readable, and then
> only because you would probably not format it on so many lines ;-)
For gits and shiggles I converted it to short array syntax. I
structure my arrays much like Sean does and I was of the opinion that
a shorter syntax would not improve the readability much. I have to
admit I do like the way the short syntax with the : separator looks,
though the => separator is not bad on the eyes either.
Converted snippets:
Using => separator:
http://paste.roguecoders.com/p/8c653602dee96b87f566a29b78aa4daa.html
Using : (JSON) separator:
http://paste.roguecoders.com/p/b117894e85b6f980b8390bc2828ca227.html
--
Herman Radtke
hermanradtke@gmail.com | http://hermanradtke.com