RE: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-07 Thread Ford, Mike
-Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: 06 February 2007 16:09 I know how much you want to feel special, but here's the definition of read. Your description of how you interpret what you see falls into this definition: Oh, no fair! You've

RE: [PHP-DEV] Syntactic improvement to array

2007-02-07 Thread Ford, Mike
-Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: 07 February 2007 02:34 I was specifically thinking of the sheer number of emails to PHP-General that would result. Even if 90% of the newbies get it without any research, and 5% more figure it out from

RE: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-06 Thread Ford, Mike
On 05 February 2007 17:29, Brian Moon wrote: Ford, Mike wrote: I don't find: $a = [1 = ['pears', 'apples'], 2 = ['juice', 'oranges']]; any less readable than: $a = array(1 = array('pears', 'apples'), 2 = array('juice', 'oranges')); Quite the opposite actually

RE: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-06 Thread Robert Cummings
On Tue, 2007-02-06 at 14:08 +, Ford, Mike wrote: On 05 February 2007 17:29, Brian Moon wrote: That is why you have coding standards. Our doucment states that this should be written as: $a = array( 1 = array('pears', 'apples'), 2 = array('juice', 'oranges') ); I

Re: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-06 Thread Alain Williams
On Tue, Feb 06, 2007 at 09:41:34AM -0500, Robert Cummings wrote: On Tue, 2007-02-06 at 14:08 +, Ford, Mike wrote: On 05 February 2007 17:29, Brian Moon wrote: That is why you have coding standards. Our doucment states that this should be written as: $a = array( 1 =

Re: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-06 Thread Christian Schneider
Alain Williams wrote: Anyway: it makes php look like perl -- and that would never do :-) Can we please stop that FUD? (even if it is meant as a joke) ... if at all then you might say it looks like Javascript, Python or Ruby. Perl uses an ugly mix of () and [] to emulate multi-dimensional arrays

Re: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-06 Thread Alain Williams
On Tue, Feb 06, 2007 at 04:16:28PM +0100, Christian Schneider wrote: Alain Williams wrote: Anyway: it makes php look like perl -- and that would never do :-) Can we please stop that FUD? (even if it is meant as a joke) No: it was NOT a serious point. What is wrong with the occasional grin ?

Re: [PHP-DEV] Syntactic improvement to array

2007-02-06 Thread Tullio Andreatta ML
how it is different? How explaining array written as [] so much harder that explaining array written as ()? What exactly constitutes the problem? Here's the difference: You can Google for 'array' and learn a lot. If you try to Google for [] you don't learn squat. Try it and see. So our

Re: [PHP-DEV] Syntactic improvement to array

2007-02-06 Thread Lars Schultz
Hi. Our 'newbie' at least has a good chance of figuring out $a = [1,2,3] vs.$a = array(1,2,3) is different than $a = foobar(1,2,3) I am probably out of my depth here...but I actually find the argument about wether to introduce this syntax or not, very

RE: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-06 Thread Ford, Mike
On 06 February 2007 14:42, Robert Cummings wrote: On Tue, 2007-02-06 at 14:08 +, Ford, Mike wrote: On 05 February 2007 17:29, Brian Moon wrote: That is why you have coding standards. Our doucment states that this should be written as: $a = array( 1 = array('pears',

Re: [PHP-DEV] Syntactic improvement to array

2007-02-06 Thread Andrei Zmievski
On Feb 5, 2007, at 3:37 PM, Richard Lynch wrote: Yes, and it makes life miserable for some of us... Is that a good reason to extend that misery to yet another operator? Richard, please. This is not advanced OO stuff or anything close. It's an operator. Give PHP users (even newbies) some

RE: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-06 Thread Robert Cummings
On Tue, 2007-02-06 at 15:41 +, Ford, Mike wrote: On 06 February 2007 14:42, Robert Cummings wrote: On Tue, 2007-02-06 at 14:08 +, Ford, Mike wrote: On 05 February 2007 17:29, Brian Moon wrote: That is why you have coding standards. Our doucment states that this should be

Re: [PHP-DEV] Syntactic improvement to array

2007-02-06 Thread Richard Lynch
On Tue, February 6, 2007 11:26 am, Andrei Zmievski wrote: On Feb 5, 2007, at 3:37 PM, Richard Lynch wrote: Yes, and it makes life miserable for some of us... Is that a good reason to extend that misery to yet another operator? Richard, please. This is not advanced OO stuff or anything

RE: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Ford, Mike
On 04 February 2007 07:25, Andi Gutmans wrote: Hi, I thought I may have brought this up a long time ago but couldn't find anything in the archives. For a long time already I've been thinking about possibly adding a new syntax for array(...) which would be shorter. I'd suggest [...]. While

RE: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Ford, Mike
On 04 February 2007 18:38, Edin Kadribasic wrote: Lukas Kahwe Smith wrote: Yes, you will come across it if its added. I find the Javascript syntax confusing to read as well. However more importantly I do not see the point in adding this sugar to save 5 chars. Nested arrays become

RE: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Ford, Mike
On 04 February 2007 21:41, Zeev Suraski wrote: 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

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Andrei Zmievski
I agree. Syntax is good, if we make it work both ways. -Andrei On Feb 4, 2007, at 8:59 AM, Zeev Suraski wrote: My 2c - unless we also make it behave like a list() when in assignment context - I think it will confusing. So I'm +1 if we make it work as both list() and array(), and -1

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Stanislav Malyshev
you, they don't have a clue what they are doing. $a = [1,2,3]; would not mean jack sqat to those folks. And as stated, finding docs on that How hard can that be? If one is smart enough to do computer programming, how hard can it be to know $a=[1,2,3] is an array? Like, what else could it

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Brian Moon
Stanislav Malyshev wrote: you, they don't have a clue what they are doing. $a = [1,2,3]; would not mean jack sqat to those folks. And as stated, finding docs on that How hard can that be? If one is smart enough to do computer programming, how hard can it be to know $a=[1,2,3] is an array?

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Stanislav Malyshev
When a new PHP user asks you What is an array? you will understand. If someone is not familiar with the concept of the array at all, it doesn't matter if it's written as array(1,2,3) or [1,2,3]. That's not what we are discussing right now. Its clear that not all the folks on internals

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Brian Moon
If someone is not familiar with the concept of the array at all, it doesn't matter if it's written as array(1,2,3) or [1,2,3]. That's not what we are discussing right now. My point is that if its written array(1,2,3) that have something to search for in the docs. The new proposed syntax

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Andrei Zmievski
I don't buy the searching docs is easier argument. There are plenty of operators and such that are hard to search for. -Andrei On Feb 5, 2007, at 11:07 AM, Brian Moon wrote: If someone is not familiar with the concept of the array at all, it doesn't matter if it's written as array(1,2,3) or

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Brian Moon
Andrei Zmievski wrote: I don't buy the searching docs is easier argument. There are plenty of operators and such that are hard to search for. Good point, but, were there pre-existing solutions to those operators when they were created? I think that is the point that Zeev was making. We

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Robert Cummings
On Mon, 2007-02-05 at 10:01 -0800, Stanislav Malyshev wrote: you, they don't have a clue what they are doing. $a = [1,2,3]; would not mean jack sqat to those folks. And as stated, finding docs on that How hard can that be? If one is smart enough to do computer programming, how hard

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Stanislav Malyshev
$a = array( 1, 2, 3 ). It's not hard. I don't think anybody ever argued it's hard to understand. The argument was it's too verbose once you talk about multi-dimensional arrays with a lot of sub-arrays containing in turn even more sub-arrays - entire code becomes packed with

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Richard Lynch
On Mon, February 5, 2007 12:01 pm, Stanislav Malyshev wrote: you, they don't have a clue what they are doing. $a = [1,2,3]; would not mean jack sqat to those folks. And as stated, finding docs on that How hard can that be? If one is smart enough to do computer programming, how hard can

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Richard Lynch
On Mon, February 5, 2007 12:24 pm, Stanislav Malyshev wrote: When a new PHP user asks you What is an array? you will understand. If someone is not familiar with the concept of the array at all, it doesn't matter if it's written as array(1,2,3) or [1,2,3]. That's not what we are

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Stanislav Malyshev
Put it this way: Are you willing to answer EVERY PHP-General question asking what this is? ;-) Cuz I'm sure not willing to do it. I'm not willing to answer newbie questions on regular basis, but that has nothing to do with anything - I was unwilling to do it with any syntax. I just think

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Richard Lynch
On Mon, February 5, 2007 1:18 pm, Andrei Zmievski wrote: I don't buy the searching docs is easier argument. There are plenty of operators and such that are hard to search for. Yes, and it makes life miserable for some of us... Is that a good reason to extend that misery to yet another

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Marcus Boerger
Hello Andi, it is a bit harder to read and not the php way imo. best regards marcus Sunday, February 4, 2007, 8:25:22 AM, you wrote: Hi, I thought I may have brought this up a long time ago but couldn't find anything in the archives. For a long time already I've been thinking about

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread phpxcache
I think it's not worth doing unless there's overwhelming support as it's not desperately needed. But I'd be interested to hear people's thoughts. It seems implementation shouldn't be an issue but I'd have to dive a bit deeper. it sure acceptable for php users and will never be a conflict to

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Pierre
Hi Andi, On 2/4/07, Andi Gutmans [EMAIL PROTECTED] wrote: Hi, I thought I may have brought this up a long time ago but couldn't find anything in the archives. For a long time already I've been thinking about possibly adding a new syntax for array(...) which would be shorter. I'd suggest

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Edin Kadribasic
I like it :) +1 Edin On Feb 4, 2007, at 8:25, Andi Gutmans wrote: Hi, I thought I may have brought this up a long time ago but couldn't find anything in the archives. For a long time already I've been thinking about possibly adding a new syntax for array(...) which would be shorter. I'd

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Johannes Schlüter
Hi Andi, I'd like such a syntax enhancement. These should be the results from the last time the issue was discussed: http://devzone.zend.com/node/view/id/1474#Heading7 If I remember correct the main issues stated against it were - it's to perlish - Without keyword it's hard to find the

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Nico Haase
Hallöchen, *Johannes Schlüter* schrub: - Without keyword it's hard to find the documentation if you don't know that syntax Well, this is the same with HEREDOC since you can use any delimiter. And this new array-syntax should not replace the old one, but extend it, so everyone who wants to

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Hannes Magnusson
On 2/4/07, Nico Haase [EMAIL PROTECTED] wrote: Hallöchen, *Johannes Schlüter* schrub: - Without keyword it's hard to find the documentation if you don't know that syntax Well, this is the same with HEREDOC since you can use any delimiter. http://php.net/ -Hannes And this new

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Hannes Magnusson
Hi Andi function typeHinted([] $array = []) { // type hint array, default to empty one if(count($array)) { array_merge($array, [foo = []]); // merge $array with array(foo = array()); return $array; } return []; // empty array } typeHinted([1 = [1 = []]]); // array(1 =

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Christian Schneider
Hannes Magnusson wrote: typeHinted([1 = [1 = []]]); // array(1 = array(1 = array())); IMHO the common case would benefit and your pathological example is unreadable both ways. Personally I'd reformat it to typeHinted([ 1 = [ 1 = [] ] ]); resp.

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Pierre
On 2/4/07, Hannes Magnusson [EMAIL PROTECTED] wrote: Hi Andi function typeHinted([] $array = []) { // type hint array, default to empty one That's a wrong example. Type hinting should still rely on the literal name: function typeHinted(Array $myarray=[]) --Pierre -- PHP Internals - PHP

RE: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Andi Gutmans
Message- From: Hannes Magnusson [mailto:[EMAIL PROTECTED] Sent: Sunday, February 04, 2007 6:30 AM To: Andi Gutmans Cc: internals@lists.php.net Subject: Re: [PHP-DEV] Syntactic improvement to array Hi Andi function typeHinted([] $array = []) { // type hint array, default to empty one

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Lukas Kahwe Smith
Marcus Boerger wrote: Hello Andi, it is a bit harder to read and not the php way imo. I agree with Marcus. regards, Lukas -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Rasmus Lerdorf
Marcus Boerger wrote: it is a bit harder to read and not the php way imo. The PHP way is to steal and borrow from other languages whenever possible to produce a syntax that is clear and understandable to people doing web development. What is clear and understandable to web developers is a

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Zeev Suraski
My 2c - unless we also make it behave like a list() when in assignment context - I think it will confusing. So I'm +1 if we make it work as both list() and array(), and -1 otherwise. Zeev At 09:25 04-02-07, Andi Gutmans wrote: Hi, I thought I may have brought this up a long time ago but

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Ilia Alshanetsky
I have to second Marcus on this, this new syntax makes things harder to read. I mean what are you saving here, a few letter? Ilia On 4-Feb-07, at 2:25 AM, Andi Gutmans wrote: Hi, I thought I may have brought this up a long time ago but couldn't find anything in the archives. For a long

RE: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Andi Gutmans
PROTECTED] Sent: Sunday, February 04, 2007 9:28 AM To: Andi Gutmans Cc: internals@lists.php.net Subject: Re: [PHP-DEV] Syntactic improvement to array I have to second Marcus on this, this new syntax makes things harder to read. I mean what are you saving here, a few letter? Ilia On 4-Feb

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Ilia Alshanetsky
. Andi -Original Message- From: Ilia Alshanetsky [mailto:[EMAIL PROTECTED] Sent: Sunday, February 04, 2007 9:28 AM To: Andi Gutmans Cc: internals@lists.php.net Subject: Re: [PHP-DEV] Syntactic improvement to array I have to second Marcus on this, this new syntax makes things harder

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Pierre
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

[PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Steph
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

Re: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Lukas Kahwe Smith
Steph wrote: 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

RE: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Mike Robinson
Pierre wrote: 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

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Ilia Alshanetsky
On 4-Feb-07, at 1:14 PM, Pierre wrote: 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

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Lukas Kahwe Smith
Ilia Alshanetsky wrote: On 4-Feb-07, at 1:14 PM, Pierre wrote: 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

Re: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Edin Kadribasic
Lukas Kahwe Smith wrote: Yes, you will come across it if its added. I find the Javascript syntax confusing to read as well. However more importantly I do not see the point in adding this sugar to save 5 chars. Nested arrays become very unreadable with the current PHP syntax. I think killing

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Pierre
On 2/4/07, Ilia Alshanetsky [EMAIL PROTECTED] wrote: On 4-Feb-07, at 1:14 PM, Pierre wrote: 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

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Derick Rethans
On Sat, 3 Feb 2007, Andi Gutmans wrote: I thought I may have brought this up a long time ago but couldn't find anything in the archives. For a long time already I've been thinking about possibly adding a new syntax for array(...) which would be shorter. I'd suggest [...]. While I am

Re: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Derick Rethans
On Sun, 4 Feb 2007, Edin Kadribasic wrote: I don't find: $a = [1 = ['pears', 'apples'], 2 = ['juice', 'oranges']]; any less readable than: $a = array(1 = array('pears', 'apples'), 2 = array('juice', 'oranges')); Quite the opposite actually :) That's a personal thing, and I disagree.

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Marcus Boerger
Hello Pierre, as much as you are true we never accepted the argument that some simply can skip a certain syntax or feature. best regards marcus Sunday, February 4, 2007, 7:14:19 PM, you wrote: Hi, On 2/4/07, Ilia Alshanetsky [EMAIL PROTECTED] wrote: I personally find array extremely

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Stanislav Malyshev
IAI personally find array extremely clear, in recent weeks I had to do A IALOT of JavaScript work where the array syntax works in a manner you IAsuggest for PHP and its a massive pain. It does not make for a very By pure coincidence, I was doing a bunch of javascript work lately too, and I

[PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Steph
Hi Stas, By pure coincidence, I was doing a bunch of javascript work lately too, and I find [] syntax OK. From readability POV it's not much difference, but much less clutter if you have really massive data array - no array() things which take half of the space. Fine, but in javascript

Re: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Stefan Walk
Steph wrote: Hi Stas, By pure coincidence, I was doing a bunch of javascript work lately too, and I find [] syntax OK. From readability POV it's not much difference, but much less clutter if you have really massive data array - no array() things which take half of the space. Fine, but in

[PHP-DEV] [SPAM] Re: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Steph
Fine, but in javascript there is only one option. That's the difference. - Steph a = Array(1,2,3) a = [1,2,3] I stand corrected. Apologies for the noise. - Steph -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Zeev Suraski
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

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Pierre
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

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Zeev Suraski
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

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Pierre
On 2/4/07, Zeev Suraski [EMAIL PROTECTED] wrote: 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'. We already have many ways

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Zeev Suraski
At 23:51 04-02-07, Pierre wrote: On 2/4/07, Zeev Suraski [EMAIL PROTECTED] wrote: 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

Re: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Robert Cummings
On Sun, 2007-02-04 at 19:38 +0100, Edin Kadribasic wrote: Lukas Kahwe Smith wrote: Yes, you will come across it if its added. I find the Javascript syntax confusing to read as well. However more importantly I do not see the point in adding this sugar to save 5 chars. Nested arrays become

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Richard Lynch
On Sun, February 4, 2007 1:25 am, Andi Gutmans wrote: I thought I may have brought this up a long time ago but couldn't find anything in the archives. For a long time already I've been thinking about possibly adding a new syntax for array(...) which would be shorter. I'd suggest [...]. While

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Richard Lynch
On Sun, February 4, 2007 10:59 am, Zeev Suraski wrote: My 2c - unless we also make it behave like a list() when in assignment context - I think it will confusing. So I'm +1 if we make it work as both list() and array(), and -1 otherwise. Can you show by example what this means? I'm seeing

Re: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Richard Lynch
On Sun, February 4, 2007 2:46 pm, Stefan Walk wrote: Steph wrote: Hi Stas, By pure coincidence, I was doing a bunch of javascript work lately too, and I find [] syntax OK. From readability POV it's not much difference, but much less clutter if you have really massive data array - no array()

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Richard Lynch
On Sun, February 4, 2007 8:58 am, Christian Schneider wrote: Plus you could still use array() if you really wanted to. Yes, but sooner or later I am stuck with somebody else's code who decided to write the non-array version, and I'm sitting there wondering what [bleep] this code is doing.

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Richard Lynch
On Sun, February 4, 2007 7:53 am, Hannes Magnusson wrote: On 2/4/07, Nico Haase [EMAIL PROTECTED] wrote: Hallöchen, *Johannes Schlüter* schrub: - Without keyword it's hard to find the documentation if you don't know that syntax Well, this is the same with HEREDOC since you can use

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Brian Moon
phpxcache wrote: most ppl who works on web pages have to know what javascript is, so there isn't any difficulty for ppl to get used ... You give brand new PHP hackers too much credit. Sure professional PHP developers do have to work with Javascript. But, working on Phorum and see real

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Antony Dovgal
On 02/04/2007 10:25 AM, Andi Gutmans wrote: Hi, I thought I may have brought this up a long time ago but couldn't find anything in the archives. For a long time already I've been thinking about possibly adding a new syntax for array(...) which would be shorter. I'd suggest [...]. While I am

[PHP-DEV] Syntactic improvement to array

2007-02-03 Thread Andi Gutmans
Hi, I thought I may have brought this up a long time ago but couldn't find anything in the archives. For a long time already I've been thinking about possibly adding a new syntax for array(...) which would be shorter. I'd suggest [...]. While I am usually not in favor of having more than one