atom feed88 messages in net.php.lists.internalsRe: [PHP-DEV] Proposal: Array syntax
FromSent OnAttachments
Christian SchneiderNov 4, 2003 3:33 pm.patch
Rasmus LerdorfNov 4, 2003 5:07 pm 
Ken TossellNov 4, 2003 5:10 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:48 am 
Christian SchneiderNov 5, 2003 2:07 am 
s0niXNov 5, 2003 2:43 am 
Ford, Mike [LSS]Nov 5, 2003 3:21 am 
Mike RobinsonNov 5, 2003 3:27 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:08 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:04 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:48 am 
Andi GutmansNov 5, 2003 8:48 am 
Jani TaskinenNov 5, 2003 8:50 am 
Ford, Mike [LSS]Nov 5, 2003 8:51 am 
Marco TabiniNov 5, 2003 8:52 am 
Christian SchneiderNov 5, 2003 8:55 am 
George SchlossnagleNov 5, 2003 8:58 am 
55 later messages
Subject:Re: [PHP-DEV] Proposal: Array syntax
From:Christian Schneider (csch@cschneid.com)
Date:Nov 5, 2003 2:07:06 am
List:net.php.lists.internals

Andi Gutmans wrote:

I guess I think it'd be interesting to see what other's think. Also, another point to check is if list() can also be converted into [] because having a hybrid wouldn't be too nice.

Having list() work the same way would be very sexy indeed: [$a, $b] = [$b, $a];

To be honest I never really liked the distinction between list() and array().

Using [] for arrays is also consistent with dereferenceing arrays and therefore shouldn't confuse people really.

My first shot at extending the parser to allow [] for list() failed though as both T_LIST and T_ARRAY are used in expr_without_variable. But I'm sure you could find a clever way around this, my knowledge of yacc is still limited :-)

But even without [] for list() I think [] for array() would be nice ;-)

- Chris