At 23:27 04-02-07, Pierre wrote:
On 2/4/07, Zeev Suraski <[EMAIL PROTECTED]> wrote:
At 20:14 04-02-07, Pierre wrote:
>Hi,
>
>On 2/4/07, Ilia Alshanetsky <[EMAIL PROTECTED]> wrote:
>>I personally find array extremely clear, in recent weeks I had to do
>>A LOT of JavaScript work where the array syntax works in a manner you
>>suggest for PHP and its a massive pain. It does not make for a very
>>clear code. I think the syntax you propose is extremely confusing and
>>we should stick to what we have right now.
>
>If someone does not like this new syntax, he can stick to array(). It
>is in no way an argument to refuse the new syntax addition.

We never believed in that approach and we're not about to start now :).

What I mean is that the new syntax does not any drawback besides
hurting a couple of people eyes (I'm pretty sure that most of our
users will like it). The changes have no effect on how your scripts
will run, not like the numerous changes we applied in 5.x until now.

One of the key guidelines of the language definition process of PHP was that we don't want multiple ways of doing the same thing, and we don't buy the argument of 'why do you care? you can still do it the other way'. Only if the new way is significantly better than the old way of doing things (i.e. much faster / much simpler, etc.) we consider it. I think it's been a very good guideline and helped us a lot in keeping PHP relatively clean for a very long time.

The new array syntax is arguably clearer (although some here disagree). It's not MUCH clearer to the sense that it's a no brainer, which makes things more complicated.

I think we can live w/o it like we did in the last decade, but I feel strongly about not introducing it unless we also support [] as a replacement for list(). If [] works for arrays people would expect it to work for lists too. I guess my more accurate vote for that option would be +0 (and -1 in case it's only a replacement for array()).

Zeev

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

Reply via email to