Re: [SPAM] Re: [PHP-DEV] Syntactic improvement to array
| From: | Richard Lynch | Date: | Mon, 05 Feb 2007 04:27:13 +0000 |
| Subject: | Re: [SPAM] Re: [PHP-DEV] Syntactic improvement to array | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-27784@lists.php.net to get a copy of this message | ||
On Sun, February 4, 2007 2:46 pm, Stefan Walk wrote:
> Steph wrote:
>> Hi Stas,
>>
>>> By pure coincidence, I was doing a bunch of javascript work lately
>>> too, and I find [] syntax OK. From readability POV it's not much
>>> difference, but much less clutter if you have really massive data
>>> array - no array() things which take half of the space.
>>
>> Fine, but in javascript there is only one option. That's the
>> difference.
>>
>> - Steph
>
> a = Array(1,2,3)
> a = [1,2,3]
Apparently I missed the JS tutorial that you could use [1, 2, 3] cuz I
always just did it the PHP way...
Never been unhappy about it, except when I forget to Capitalize the
dang thing... :-)
I'm not planning on switching to the other syntax in JS either -- An
easy-to-find Caps error beats WTF any day, and to me, not having
'array' there is just a WTF.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?