Antony Dovgal wrote:
do you agree, that $a[] = ''; and $a = []; look almost similar for newbies?

And they both deal with arrays. That's not confusing to me.
Why have $a[] = ''; then in the first place? You already have array_push($a, ''). Or do you seriously think $a[] = ''; shouldn't be there?


PHP didn't have some kind of private/public/static/throw/catch before.

Not true, you could do the same thing manually. Very ugly but possible. But that's academic.


and you're trying to invent new kind of wheel, 'cause you think common model of wheel is "ugly".

I'm trying to remove bumps from existing wheels because I thinks the car is almost perfect. That's the main problem: You think it needs whole new constructs but the existing ones are perfect whereas I think some of the existing constructs could use some polishing but have no need for 'big' changes. And I accept that some people want things like throw, catch or final but you don't accept that having an elegant syntax for writing simple code is important to me.


again, I can't understand why PHP should have another way of creating new arrays.

Again, cecause it's nicer to use (read and write) IMHO. Especially for nested arrays and arrays in function calls.


there are so many things you can improve in PHP - why did you choose to change the syntax?

Because I don't think PHP _needs_ major changes.
I was trying to convince people on the phpdev list that PHP4 should use references instead of copying objects back then when it was designed but was rejected. Now this is finally changed in PHP5 which is great. This was basically my last major complaint about the object model and language constructs and that's why I'm trying to work on the details.


- Chris

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



Reply via email to