Re: [PHP-DEV] Proposal: Array syntax

2003-11-06 Thread Andi Gutmans
At 02:07 AM 11/6/2003 +0100, Christian Schneider wrote: George Schlossnagle wrote: George (thinking [] is pretty but disliking alternative syntaxes) Ok, let me recap my short visit on this mailing list: 1) Dangling commas in function calls were considered bloat No, not bloat. I was worried that

Re: [PHP-DEV] Proposal: Array syntax

2003-11-06 Thread Stig S. Bakken
On Wed, 2003-11-05 at 17:48, Andi Gutmans wrote: At 11:48 AM 11/5/2003 -0500, Ilia Alshanetsky wrote: On November 5, 2003 11:21 am, you wrote: 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

Re: [PHP-DEV] Proposal: Array syntax

2003-11-06 Thread Kouber Saparev
Perlish or not could not be a real reason for adding or not adding a feature in PHP. The important thing here is if it fits to the language concept or not. Kouber Sara Golemon [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] FWIW- (And I understand I'm late chiming in on this thread)

RE: [PHP-DEV] Proposal: Array syntax

2003-11-06 Thread Mike Robinson
Kouber Saparev wrote: Perlish or not could not be a real reason for adding or not adding a feature in PHP. The important thing here is if it fits to the language concept or not. Indeed, and IMHO it does, much like ($a==$b)?... fits in quite well as an alternative to if ($a==$b)... It is

Re: [PHP-DEV] Proposal: Array syntax

2003-11-06 Thread Andi Gutmans
At 09:58 AM 11/6/2003 +0100, Stig S. Bakken wrote: Let's sum up the pros and cons: Pros: sexiness? Cons: another BC issue, syntax obfuscation, potential grammar conflicts Just to be more accurate there are no BC issues and as far as I know, there aren't any grammar conflicts. Andi -- PHP

Re: [PHP-DEV] Proposal: Array syntax

2003-11-06 Thread Alexey Trunyov
Mike Robinson wrote: Perlish or not could not be a real reason for adding or not adding a feature in PHP. The important thing here is if it fits to the language concept or not. Indeed, and IMHO it does, much like ($a==$b)?... fits in quite well as an alternative to if ($a==$b)... It is an

RE: [PHP-DEV] Proposal: Array syntax

2003-11-06 Thread Ford, Mike [LSS]
On 05 November 2003 17:19, Marco Tabini wrote: Ford, Mike [LSS] wrote: On 05 November 2003 17:06, Marco Tabini contributed these pearls of wisdom: Christian Schneider wrote: Marco Tabini wrote: $a = [[1,2,3],[1=[1,3,2,2], a=[[1,2,3,4],4,[1,2]]];

RE: [PHP-DEV] Proposal: Array syntax

2003-11-06 Thread Ford, Mike [LSS]
On 05 November 2003 18:39, Andrei Zmievski wrote: On Wed, 05 Nov 2003, Ford, Mike [LSS] wrote: I don't think the number of characters is the main issue here -- it's about having a *nicer* set of characters. Personally, I'd be still be in favour (although not quite as

[PHP-DEV] EOT (was RE: [PHP-DEV] Proposal: Array syntax)

2003-11-06 Thread Sascha Schumann
Please move this thread to private email. - Sascha -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] EOT (was RE: [PHP-DEV] Proposal: Array syntax)

2003-11-06 Thread Andi Gutmans
Sascha, I don't think it's a private matter. Feel free to delete the emails with this subject when they come in. Andi At 01:30 PM 11/6/2003 +0100, Sascha Schumann wrote: Please move this thread to private email. - Sascha -- PHP Internals - PHP Runtime Development Mailing List To

Re: [PHP-DEV] EOT (was RE: [PHP-DEV] Proposal: Array syntax)

2003-11-06 Thread Sascha Schumann
On Thu, 6 Nov 2003, Andi Gutmans wrote: Sascha, I don't think it's a private matter. If there was anything constructive in that long thread of I like it -- no, I don't! I might agree with you, but given the current contents, the noise exceeds the useful debate by far. -

Re: [PHP-DEV] Proposal: Array syntax

2003-11-06 Thread Stig S. Bakken
On Thu, 2003-11-06 at 13:04, Andi Gutmans wrote: At 09:58 AM 11/6/2003 +0100, Stig S. Bakken wrote: Let's sum up the pros and cons: Pros: sexiness? Cons: another BC issue, syntax obfuscation, potential grammar conflicts Just to be more accurate there are no BC issues and as far as I

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Andi Gutmans
Hi Christian, Personally I don't like having two ways of doing things. It makes it harder for people to read scripts. However, I think the proposed syntax is significantly more elegant than today's array() which makes me think twice about the idea and possibly making an exception to the rule.

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Michael Walter
Very cool. How about supporting .. syntax, btw. as in [1..3] or [a..z]? Might no be the worth, just thinking out loud ;) Christian Schneider wrote: I propose to add an alternative (backward compatible) short array creation syntax: $a = [ 1, 2, 3 ]; and $a = [ 'a' = 42, 'b' = foo ]; It can

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Michael Walter
Very cool. How about supporting .. syntax, btw. as in [1..3] or [a..z]? Might no be the worth, just thinking out loud ;) might not be worth it.. Christian Schneider wrote: I propose to add an alternative (backward compatible) short array creation syntax: $a = [ 1, 2, 3 ]; and $a = [ 'a' = 42,

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Kouber Saparev
Your idea is even cooler...;) I would like to have these in PHP. Kouber Michael Walter [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Very cool. How about supporting .. syntax, btw. as in [1..3] or [a..z]? Might no be the worth, just thinking out loud ;) Christian Schneider

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Christian Schneider
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

RE: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Ford, Mike [LSS]
On 05 November 2003 08:50, Andi Gutmans contributed these pearls of wisdom: At 12:33 AM 11/5/2003 +0100, Christian Schneider wrote: I propose to add an alternative (backward compatible) short array creation syntax: $a = [ 1, 2, 3 ]; and $a = [ 'a' = 42, 'b' = foo ]; Personally I don't

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Cesare D'Amico
On Wednesday 05 November 2003 09:49, Andi Gutmans wrote: However, I think the proposed syntax is significantly more elegant than today's array() which makes me think twice about the idea and possibly making an exception to the rule. I think it'll improve the look of PHP scripts. Also I think

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Alexey Trunyov
Andi Gutmans wrote: Personally I don't like having two ways of doing things. It makes it harder for people to read scripts. It looks like the one way of doing two separate things. I mean that semanics of two usages of square brackets as operator is inverse depending on whether it is used in

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Antony Dovgal
On Wed, 05 Nov 2003 19:34:52 +0700 Alexey Trunyov [EMAIL PROTECTED] wrote: Andi Gutmans wrote: Personally I don't like having two ways of doing things. It makes it harder for people to read scripts. It looks like the one way of doing two separate things. No, it looks like someone

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Ilia Alshanetsky
I do not like the new syntax at all. If anything it seems rather unnatural and what do you save, typing of 5 characters that makes it clear that this is an array to even the most novice of users? It certainly not going to make the code any faster and if anything will only add confusion. Firm

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Marco Tabini
Hi Andi, Christian-- From a logical standpoint, I think this could be very confusing. To me, for one, square brackets imply reference, not assignment. Taking something that means take something out of the array and now using it to mean put something in the array makes the language a bit less

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Magnus Määttä
On Wed, 5 Nov 2003 08:06:53 -0500 Ilia Alshanetsky [EMAIL PROTECTED] wrote: I do not like the new syntax at all. If anything it seems rather unnatural and what do you save, typing of 5 characters that makes it clear that this is an array to even the most novice of users? It certainly not

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Derick Rethans
On Wed, 5 Nov 2003, Ilia Alshanetsky wrote: I do not like the new syntax at all. If anything it seems rather unnatural and what do you save, typing of 5 characters that makes it clear that this is an array to even the most novice of users? It certainly not going to make the code any faster

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Christian Schneider
Ok, I tried to just listen to what people are saying but this comment went too far ;-) Antony Dovgal wrote: No, it looks like someone trying to turn PHP into Perl (or Python). I'm just trying to improve PHP. And I write _a lot_ of PHP code, so I have some idea about where the syntax could be

RE: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Nicolas Toper
PROTECTED] Envoye : mercredi 5 novembre 2003 16:35 A : Antony Dovgal Cc : [EMAIL PROTECTED] Objet : Re: [PHP-DEV] Proposal: Array syntax Ok, I tried to just listen to what people are saying but this comment went too far ;-) Antony Dovgal wrote: No, it looks like someone trying to turn PHP into Perl

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Ilia Alshanetsky
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,

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Antony Dovgal
On Wed, 05 Nov 2003 16:34:52 +0100 Christian Schneider [EMAIL PROTECTED] wrote: I'm just trying to improve PHP. And I write _a lot_ of PHP code, so I have some idea about where the syntax could be improved IMHO. changing the syntax is not the best way imho. PHP is a mix of C, Perl and

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Rasmus Lerdorf
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

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Christian Schneider
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?

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Ilia Alshanetsky
On November 5, 2003 11:21 am, you wrote: 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

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Andi Gutmans
At 11:48 AM 11/5/2003 -0500, Ilia Alshanetsky wrote: On November 5, 2003 11:21 am, you wrote: 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

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Jani Taskinen
On Wed, 5 Nov 2003, Ilia Alshanetsky wrote: I do not like the new syntax at all. If anything it seems rather unnatural and what do you save, typing of 5 characters that makes it clear that this is an array to even the most novice of users? It certainly not going to make the code any faster and

RE: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Ford, Mike [LSS]
On 05 November 2003 15:57, Ilia Alshanetsky contributed these pearls of wisdom: 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

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Marco Tabini
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

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Christian Schneider
Andi Gutmans wrote: I don't believe in saving characters. Agreed, it's not about saving characters (only). Anyway, it's no biggy and if most people here think it shouldn't be added then that's fine with me. Ok, a quick head count gave 9 people pro, 6 people con and 3 people I couldn't figure

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread George Schlossnagle
On Nov 5, 2003, at 11:52 AM, Marco Tabini wrote: 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 =

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Jani Taskinen
On Wed, 5 Nov 2003, Christian Schneider wrote: Andi Gutmans wrote: I don't believe in saving characters. Agreed, it's not about saving characters (only). Anyway, it's no biggy and if most people here think it shouldn't be added then that's fine with me. Ok, a quick head count gave 9

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Christian Schneider
Marco Tabini wrote: $a = [[1,2,3],[1=[1,3,2,2], a=[[1,2,3,4],4,[1,2]]]; $a = array(array(1,2,3),array(1=array(1,3,2,2), a=array(array(1,2,3,4),4,array(1,2))); What was your point again? ;-) - Chris -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Marco Tabini
George Schlossnagle wrote: On Nov 5, 2003, at 11:52 AM, Marco Tabini wrote: 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

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Marco Tabini
Christian Schneider wrote: Marco Tabini wrote: $a = [[1,2,3],[1=[1,3,2,2], a=[[1,2,3,4],4,[1,2]]]; $a = array(array(1,2,3),array(1=array(1,3,2,2), a=array(array(1,2,3,4),4,array(1,2))); Besides my previous points, something even more abominable: $a = [1,2,$b[11]]; Is that confusing enough

RE: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Ford, Mike [LSS]
On 05 November 2003 16:48, Ilia Alshanetsky contributed these pearls of wisdom: I mean c'mon, is 5 characters that much of a problem and is absolute code clarity not worth those 5 characters? Character efficiency is done in Perl, where you can do things like ~= and @_, but that makes Perl

RE: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Ford, Mike [LSS]
On 05 November 2003 17:06, Marco Tabini contributed these pearls of wisdom: Christian Schneider wrote: Marco Tabini wrote: $a = [[1,2,3],[1=[1,3,2,2], a=[[1,2,3,4],4,[1,2]]]; $a = array(array(1,2,3),array(1=array(1,3,2,2), a=array(array(1,2,3,4),4,array(1,2))); Besides my previous

RE: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Ford, Mike [LSS]
On 05 November 2003 16:52, Marco Tabini contributed these pearls of wisdom: $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... :-) At quick glance says it looks unbalanced. A count shows why: 7 [s and 6 ]s

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Marco Tabini
Ford, Mike [LSS] wrote: On 05 November 2003 17:06, Marco Tabini contributed these pearls of wisdom: Christian Schneider wrote: Marco Tabini wrote: $a = [[1,2,3],[1=[1,3,2,2], a=[[1,2,3,4],4,[1,2]]]; $a = array(array(1,2,3),array(1=array(1,3,2,2), a=array(array(1,2,3,4),4,array(1,2)));

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Ilia Alshanetsky
On November 5, 2003 12:01 pm, Ford, Mike [LSS] wrote: I don't think the number of characters is the main issue here -- it's about having a *nicer* set of characters. Personally, I'd be still be in favour (although not quite as much) if the proposed syntax were [[[1,2,3]]] -- for me, it's

RE: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Steph
OK .. I'm a wobbler. I think it would be cool to have the cleaner alternative syntax; I think I'd use it *in some situations and not others*, and I think that that in itself would make my code virtually unmaintainable by anyone else. As Andi originally said, having more than one way to do things

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Andi Gutmans
At 11:58 AM 11/5/2003 -0500, George Schlossnagle wrote: On Nov 5, 2003, at 11:52 AM, Marco Tabini wrote: 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

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Romans Malinovskis
Think backwards.. Will you be able to convince any perl/python/javascript developer to use array(), list(), range() structs? r $a = [1,2,$b[11]]; Is that confusing enough for you? ;-) Mt. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Marco Tabini
Romans Malinovskis wrote: Think backwards.. Will you be able to convince any perl/python/javascript developer to use array(), list(), range() structs? I really don't think this needs to be a concern. You can't be everything to all people. Mt. r $a = [1,2,$b[11]]; Is that confusing enough for

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Derick Rethans
On Wed, 5 Nov 2003, Christian Schneider wrote: Andi Gutmans wrote: I don't believe in saving characters. Agreed, it's not about saving characters (only). Anyway, it's no biggy and if most people here think it shouldn't be added then that's fine with me. Ok, a quick head count

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread George Schlossnagle
On Nov 5, 2003, at 12:33 PM, Derick Rethans wrote: On Wed, 5 Nov 2003, Christian Schneider wrote: Andi Gutmans wrote: I don't believe in saving characters. Agreed, it's not about saving characters (only). Anyway, it's no biggy and if most people here think it shouldn't be added then that's fine

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Andrey Hristov
On Wed, 5 Nov 2003, Christian Schneider wrote: Andi Gutmans wrote: I don't believe in saving characters. Agreed, it's not about saving characters (only). Anyway, it's no biggy and if most people here think it shouldn't be added then that's fine with me. Ok, a quick head count gave

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Rasmus Lerdorf
On Wed, 5 Nov 2003, Christian Schneider wrote: Andi Gutmans wrote: I don't believe in saving characters. Agreed, it's not about saving characters (only). Anyway, it's no biggy and if most people here think it shouldn't be added then that's fine with me. Ok, a quick head count

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Edin Kadribasic
On Wednesday, Nov 5, 2003, at 17:48 Europe/Copenhagen, Andi Gutmans wrote: Anyway, it's no biggy and if most people here think it shouldn't be added then that's fine with me. I like the new syntax proposal, especially when passing arrays as function parameters. +1 here. Edin -- PHP

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Romans Malinovskis
The devs are mostly at the conference now. I think it is easy to discuss. I won't be surprised if cons after that are more than pros. I think end-user / newbie votes should be rather considered than dev's since they are ones who will be learning and getting used to this syntax. So why don't

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Jaap van Ganswijk
At 2003-11-05 09:59 +0100, Michael Walter wrote: Very cool. How about supporting .. syntax, btw. as in [1..3] or [a..z]? Might no be the worth, just thinking out loud ;) I'm also in favor of a shorter notation for array() and list(). In fact this also helps to ease the problem I have with

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Cesare D'Amico
Alle 18:48, mercoledì 5 novembre 2003, Romans Malinovskis ha scritto: The devs are mostly at the conference now. I think it is easy to discuss. I won't be surprised if cons after that are more than pros. I think end-user / newbie votes should be rather considered than dev's since they are

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Andrey Hristov
Jaap van Ganswijk wrote: At 2003-11-05 09:59 +0100, Michael Walter wrote: Very cool. How about supporting .. syntax, btw. as in [1..3] or [a..z]? Might no be the worth, just thinking out loud ;) I'm also in favor of a shorter notation for array() and list(). In fact this also helps to

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Marco Tabini
Michael Walter wrote: $a = [1,2,$b[11]]; Is that confusing enough for you? ;-) What's confusing about it? The fact that $b[11] references an item of an array, while [1,2,$b[11]] assigns values to the array $a. The fact that you (and, probably, most of us) can't tell right off the bat is a

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Michael Walter
I like some of the Python syntax. But some of it is cumbersome. Same with PHP. But I think PHP is closer to what I want so what's wrong with trying to improve it where it's possible (and easily done)? agree, and you can easily make PHP code not readable with such improvements. again, I can't

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Michael Walter
I guess we'll have to agree to disagree $a = [1,2,$b[11]] is semantically inconsistent. Yeah, I agree to disagree on that one, too :) Actually, do you realize that you use () both for grouping and for application? I can't see anything wrong with using square brackets for array element access

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread George Schlossnagle
On Nov 5, 2003, at 12:54 PM, Jani Taskinen wrote: On Wed, 5 Nov 2003, Andi Gutmans wrote: At 11:58 AM 11/5/2003 -0500, George Schlossnagle wrote: is that any less clear than $a = array(array(1,2,3), array(1 = array(1,3,2,2), array(a = array(array(1,2,3,4), 4, array(1,2))); Both examples can be

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Andrei Zmievski
On Wed, 05 Nov 2003, Ford, Mike [LSS] wrote: On 05 November 2003 16:48, Ilia Alshanetsky contributed these pearls of wisdom: I mean c'mon, is 5 characters that much of a problem and is absolute code clarity not worth those 5 characters? Character efficiency is done in Perl,

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread George Schlossnagle
On Nov 5, 2003, at 1:29 PM, Marco Tabini wrote: $a = [1,2,$b[11]] is semantically inconsistent. How so? Is foo(array(1,2)); semantically inconsistent? On one hand () is used with a language construct (array()), whereas in the other context it indicates arguments to a function. I think that

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Marco Tabini
George Schlossnagle wrote: On Nov 5, 2003, at 1:29 PM, Marco Tabini wrote: $a = [1,2,$b[11]] is semantically inconsistent. How so? Is I think I've already explained why. foo(array(1,2)); semantically inconsistent? On one hand () is used with a language construct (array()), whereas in the

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Shane Caraveo
+1 for the [] syntax. I also feel it's much more intuitive. Calling (what looks like) a function to make an array seems plain silly to me. Shane -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Michael Walter
Marco Tabini wrote: George Schlossnagle wrote: On Nov 5, 2003, at 1:29 PM, Marco Tabini wrote: $a = [1,2,$b[11]] is semantically inconsistent. How so? Is I think I've already explained why. Not really understandable, though. foo(array(1,2)); semantically inconsistent? On one hand () is

RE: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Robert Cummings
On Wed, 2003-11-05 at 14:03, David Enderson wrote: I believe the ultimate goal of PHP is to have a quick and dirty language that is easy to read, use, and learn. While Rasmus's comment I complete disagree with the quick and dirty statement. Maybe at one time, but I think a lot of effort has

RE: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread David Enderson
-Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 3:09 PM To: David Enderson Cc: [EMAIL PROTECTED] Subject: RE: [PHP-DEV] Proposal: Array syntax On Wed, 2003-11-05 at 14:03, David Enderson wrote: I believe the ultimate goal

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Sara Golemon
FWIW- (And I understand I'm late chiming in on this thread) I'm -1 on this syntax. It's Perlish and ugly. It is *not* PHP syntax. -Sara -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread George Schlossnagle
On Nov 5, 2003, at 5:41 PM, Sara Golemon wrote: FWIW- (And I understand I'm late chiming in on this thread) I'm -1 on this syntax. It's Perlish and ugly. It is *not* PHP syntax. To continue to play devils advocate, I actually find it C-ish and nice: char foo[] = { a, b, c i told you so};

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Wez Furlong
Anyway, it's no biggy and if most people here think it shouldn't be added then that's fine with me. Thies reminded me of something that should be considered here; we talked about and alternative array syntax for overloaded objects where all the array indices are required in one chunk to be able

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Christian Schneider
George Schlossnagle wrote: George (thinking [] is pretty but disliking alternative syntaxes) Ok, let me recap my short visit on this mailing list: 1) Dangling commas in function calls were considered bloat 2) Adding the local vars to debug_backtrace() was silently ignored 3) A prettier array

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Ard Biesheuvel
After all this I guess I have to maintain my own PHP branch and hope for PHP6 to address some of my issues. Or switch to another language at some point, because a language to me is a tool, not a religion. This is exactly the point. Why waste so much energy on deciding how to spell out your

Re: [PHP-DEV] Proposal: Array syntax

2003-11-05 Thread Christian Schneider
Ard Biesheuvel wrote: spell out your array definitions. The decision has been made a long time ago to use the array() syntax. Adding alternatives adds nothing but the I was under the impression that syntax changes are possible. Silly me. Try/catch however are a fundamental extension to the

Re: [PHP-DEV] Proposal: Array syntax

2003-11-04 Thread Ken Tossell
Christian Schneider wrote: Note: I checked the newsgroup archive but couldn't find a discussion about this. After not hearing back about my proposed enhancement to debug_backtrace() and the dangling comma for function call parameters being rejected I wonder if I'm using the right mailing list

Re: [PHP-DEV] Proposal: Array syntax

2003-11-04 Thread Rasmus Lerdorf
More magic. The difference between these two lines: $a = array(1,2,3); $a = [ 1,2,3 ]; is that with the first you can go and look up the array keyword and see what it does, whereas on the second line you have no idea. You can't look up a [ You are right that arrays are common and that this