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 
Edin KadribasicNov 5, 2003 9:45 am 
Romans MalinovskisNov 5, 2003 9:48 am 
Moriyoshi KoizumiNov 5, 2003 9:50 am 
Jani TaskinenNov 5, 2003 9:54 am 
Jaap van GanswijkNov 5, 2003 10:06 am 
Michael WalterNov 5, 2003 10:12 am 
Cesare D'AmicoNov 5, 2003 10:22 am 
Marco TabiniNov 5, 2003 10:28 am 
Michael WalterNov 5, 2003 10:30 am 
Michael WalterNov 5, 2003 10:35 am 
George SchlossnagleNov 5, 2003 10:36 am 
Andrei ZmievskiNov 5, 2003 10:39 am 
George SchlossnagleNov 5, 2003 10:56 am 
David EndersonNov 5, 2003 11:02 am 
Marco TabiniNov 5, 2003 11:10 am 
Shane CaraveoNov 5, 2003 11:12 am 
Michael WalterNov 5, 2003 12:26 pm 
Greg MacLellanNov 5, 2003 12:40 pm 
Robert CummingsNov 5, 2003 1:08 pm 
David EndersonNov 5, 2003 1:19 pm 
Sara GolemonNov 5, 2003 2:40 pm 
George SchlossnagleNov 5, 2003 3:00 pm 
Wez FurlongNov 5, 2003 4:06 pm 
Christian SchneiderNov 5, 2003 5:07 pm 
Ard BiesheuvelNov 5, 2003 5:27 pm 
Christian SchneiderNov 5, 2003 5:50 pm 
Andi GutmansNov 6, 2003 12:03 am 
Stig S. BakkenNov 6, 2003 12:58 am 
Kouber SaparevNov 6, 2003 1:24 am 
Mike RobinsonNov 6, 2003 3:31 am 
Andi GutmansNov 6, 2003 4:04 am 
Ford, Mike [LSS]Nov 6, 2003 4:09 am 
Alexey TrunyovNov 6, 2003 4:15 am 
Ford, Mike [LSS]Nov 6, 2003 4:27 am 
Sascha SchumannNov 6, 2003 4:30 am 
Andi GutmansNov 6, 2003 5:28 am 
Sascha SchumannNov 6, 2003 5:46 am 
Stig S. BakkenNov 6, 2003 6:32 am 
Subject:Re: [PHP-DEV] Proposal: Array syntax
From:Marco Tabini (mar@tabini.ca)
Date:Nov 5, 2003 8:52:00 am
List:net.php.lists.internals

Rasmus Lerdorf wrote:

On Wed, 5 Nov 2003, Ilia Alshanetsky wrote:

On November 5, 2003 10:34 am, Christian Schneider wrote:

PHP is a mix of C, Perl and other styles anyway, why deny it? It's strength is that it's a pragmatic and simple language but that doesn't mean that nothing should be changed ever.

PHP strength (IMHO) is it's simple and clear syntax, which allows people who come from background in other programming languages can quickly recognize and get used to. Creating confusing alternate syntaxes will bring us ever closer to Perl 6 where there are dozens of way to do the same thing. The end results in a confusing and hard to read/write language that all but the most dedicated of users refuse to use.

Well, like I said before, I am not sure this is a clear case of that. I'm probably the biggest defender around of the no-magic rule, but [] does imply something array-related to most people, so I think the magic part is much smaller than in other proposals we have seen.

But isn't there a big difference between an assignment and a reference? I, for one, think that language constructs should be as univocal as possible in order to minimize confusion, lest we end up having to read something like:

$a = [[1,2,3],[1=>[1,3,2,2], "a"=>[[1,2,3,4],4,[1,2]]];

I don't know about you, but I can't even begin to count the brackets in there... :-)

Cheers,

Marco