atom feed88 messages in net.php.lists.internalsRe: [PHP-DEV] Proposal: Array syntax
FromSent OnAttachments
Christian SchneiderNov 4, 2003 3:32 pm.patch
Rasmus LerdorfNov 4, 2003 5:06 pm 
Ken TossellNov 4, 2003 5:09 pm 
Andi GutmansNov 5, 2003 12:49 am 
Michael WalterNov 5, 2003 12:59 am 
Michael WalterNov 5, 2003 1:03 am 
Kouber SaparevNov 5, 2003 1:47 am 
Christian SchneiderNov 5, 2003 2:06 am 
s0niXNov 5, 2003 2:43 am 
Ford, Mike [LSS]Nov 5, 2003 3:20 am 
Mike RobinsonNov 5, 2003 3:26 am 
Dirkjan OchtmanNov 5, 2003 3:45 am 
Cesare D'AmicoNov 5, 2003 4:02 am 
Alexey TrunyovNov 5, 2003 4:34 am 
Antony DovgalNov 5, 2003 4:59 am 
Marco TabiniNov 5, 2003 5:04 am 
Ilia AlshanetskyNov 5, 2003 5:06 am 
Magnus MäättäNov 5, 2003 5:07 am 
Derick RethansNov 5, 2003 5:18 am 
Christian SchneiderNov 5, 2003 7:34 am 
Nicolas ToperNov 5, 2003 7:47 am 
Ilia AlshanetskyNov 5, 2003 7:56 am 
Antony DovgalNov 5, 2003 8:03 am 
Rasmus LerdorfNov 5, 2003 8:21 am 
Christian SchneiderNov 5, 2003 8:30 am 
Andrey HristovNov 5, 2003 8:40 am 
Ilia AlshanetskyNov 5, 2003 8:47 am 
Andi GutmansNov 5, 2003 8:47 am 
Jani TaskinenNov 5, 2003 8:49 am 
Ford, Mike [LSS]Nov 5, 2003 8:50 am 
Marco TabiniNov 5, 2003 8:52 am 
Christian SchneiderNov 5, 2003 8:54 am 
George SchlossnagleNov 5, 2003 8:58 am 
Jani TaskinenNov 5, 2003 8:59 am 
Christian SchneiderNov 5, 2003 9:00 am 
Ford, Mike [LSS]Nov 5, 2003 9:00 am 
Marco TabiniNov 5, 2003 9:01 am 
Marco TabiniNov 5, 2003 9:05 am 
Ford, Mike [LSS]Nov 5, 2003 9:07 am 
Ford, Mike [LSS]Nov 5, 2003 9:09 am 
Marco TabiniNov 5, 2003 9:18 am 
Romans MalinovskisNov 5, 2003 9:19 am 
Andi GutmansNov 5, 2003 9:20 am 
StephNov 5, 2003 9:25 am 
Andrey HristovNov 5, 2003 9:25 am 
Ilia AlshanetskyNov 5, 2003 9:25 am 
Marco TabiniNov 5, 2003 9:30 am 
Derick RethansNov 5, 2003 9:33 am 
George SchlossnagleNov 5, 2003 9:36 am 
Rasmus LerdorfNov 5, 2003 9:45 am 
38 later messages
Subject:Re: [PHP-DEV] Proposal: Array syntax
From:Christian Schneider (csch@cschneid.com)
Date:Nov 5, 2003 8:30:04 am
List:net.php.lists.internals

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