OK, so 10 years into PHP suddenly we need a new way for people to understand arrays?

I think what we have already is good enough. Speaking as an arts grad who came into coding late in life and learned C via PHP...

- Steph

----- Original Message ----- From: "James Crane" <[EMAIL PROTECTED]>
To: "php internals" <internals@lists.php.net>
Sent: Friday, February 03, 2006 6:05 AM
Subject: Re: [PHP-DEV] PHP Array Literals


[Reply below]

On 2/2/06, Christian Schneider <[EMAIL PROTECTED]> wrote:
While I would kinda like array literals too (and even had a patch for it
some time ago, don't remember if it was without problems though) the
core developers think that
a) one working solution is enough
b) array() is easier to understand/lookup/teach than [].

There are no "objective" arguments against it but you won't change their
mind by repeating your question ;-)

Array literals have been proposed several times already and won't be
added to the language anytime soon. Not much you can do about it but
maintain your own patch if you really want it.

- Chris

Yeah, that wouldn't be a very good solution as the code is meant to be
distributed. Those two reasons right there are indeed very good, and
nobody's really expressed them so simply. If my desire for a simpler
syntax wasn't so strong, I'd be compelled to give up just for these.

But, here's a question: how easy is it to look up [] for accessing
indexes of arrays? It's all within the arrays section of the
documentation, no? So it would go right in there as well.

And don't you think that understanding will be able to understand that
[]s access properties of an array and []s can also create these values
(or, more logically, this value)? The same goes for teaching.

To me, the only good excuse not to implement is that array() works,
but that is a bit weak considering the idea of changes to a language
(or addendums, really) is to evolve the language to be more usable,
logical, consistent, intelligent, and easy to use.

M.T.

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

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

Reply via email to