Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-06-02 Thread Gwynne Raskind
On Jun 1, 2011, at 7:35 AM, Derick Rethans wrote: But only if you keep it consistent, PHP has always been using = for key/val association, I don't see any reason to suddenly provide key: val, unless what you want is to confuse people. Yes, definitely = vs. : in any case. +1 to this. --

RE: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-06-01 Thread Ford, Mike
-Original Message- From: ekne...@gmail.com [mailto:ekne...@gmail.com] On Behalf Of Etienne Kneuss Sent: 01 June 2011 01:57 To: internals@lists.php.net Subject: Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux) +1 for a short array syntax. But only if you keep it consistent

Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-06-01 Thread dukeofgaming
Of Etienne Kneuss Sent: 01 June 2011 01:57 To: internals@lists.php.net Subject: Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux) +1 for a short array syntax. But only if you keep it consistent, PHP has always been using = for key/val association, I don't see any reason to suddenly

Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-06-01 Thread Rune Kaagaard
then?. Regards, David On Wed, Jun 1, 2011 at 4:36 AM, Ford, Mike m.f...@leedsmet.ac.uk wrote: -Original Message- From: ekne...@gmail.com [mailto:ekne...@gmail.com] On Behalf Of Etienne Kneuss Sent: 01 June 2011 01:57 To: internals@lists.php.net Subject: Re: [PHP-DEV] Re: RFC: Short

RE: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-06-01 Thread John Crenshaw
; internals@lists.php.net Subject: Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux) After that argument, I think I'm against : now too. +1 to = Could { } be implemented for objects too then?. Regards, David On Wed, Jun 1, 2011 at 4:36 AM, Ford, Mike m.f...@leedsmet.ac.uk wrote

Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-06-01 Thread Derick Rethans
On Wed, 1 Jun 2011, Etienne Kneuss wrote: +1 for a short array syntax. I'm still -1 on it. It makes absolutely unreadable code (yes, also in JavaScript with f.e. MongoDB). But only if you keep it consistent, PHP has always been using = for key/val association, I don't see any reason to

[PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-06-01 Thread David Soria Parra
On 2011-05-31, Brian Moon br...@moonspot.net wrote: https://wiki.php.net/rfc/shortsyntaxforarrays PHP SVN account holder voters = Pro: Andrei Zmievski, Andi Gutmans, Pierre Joye, Rasmus Lerdorf, Stanislav Malyshev, Brian Moon, Kalle Sommer Nielsen, Edin Kadribasic

Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-06-01 Thread Sean Coates
This discussion seems to lack real-world examples… Derick wrote: I'm still -1 on it. It makes absolutely unreadable code (yes, also in JavaScript with f.e. MongoDB). Here's an actual snippet from my production code (which interfaces with ElasticSearch):

Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-06-01 Thread Ilia Alshanetsky
On Wed, Jun 1, 2011 at 4:27 PM, Sean Coates s...@seancoates.com wrote: This discussion seems to lack real-world examples… Derick wrote: I'm still -1 on it. It makes absolutely unreadable code (yes, also in JavaScript with f.e. MongoDB). Here's an actual snippet from my production code

Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-06-01 Thread Philip Olson
On Jun 1, 2011, at 7:30 AM, Ilia Alshanetsky wrote: On Wed, Jun 1, 2011 at 4:27 PM, Sean Coates s...@seancoates.com wrote: This discussion seems to lack real-world examples… Derick wrote: I'm still -1 on it. It makes absolutely unreadable code (yes, also in JavaScript with f.e. MongoDB).

Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-06-01 Thread Justin Carmony
In all seriousness, there is a vast majority of PHP developers who are not represented on this list. I was surprised to see someone mentioning for calling for another vote so soon after this discussion came up. Perhaps instead of debating on readability and usefulness, we actually do some

Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-06-01 Thread Rasmus
On 06/01/2011 08:00 AM, Justin Carmony wrote: In all seriousness, there is a vast majority of PHP developers who are not represented on this list. I was surprised to see someone mentioning for calling for another vote so soon after this discussion came up. Perhaps instead of debating on

Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-06-01 Thread Matt Wilson
Would it be possible to have a vote on the various options being proposed here? I think JSON syntax is definitely more concise and easier to type, as well as more convenient -- but I don't think it makes sense for PHP without changing how arrays work (I'm all for that, but that's a different

Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-06-01 Thread Herman Radtke
Here's an actual snippet from my production code (which interfaces with ElasticSearch): http://paste.roguecoders.com/p/0747f2363c228a09e0ddd6f8ec52f2e8.html If you consider this readable, you're fare more literate than I will ever be (-: Using JSON syntax would only maybe make it more

Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-06-01 Thread Benjamin Eberlei
On Wed, 1 Jun 2011 10:27:36 -0400, Sean Coates wrote: This discussion seems to lack real-world examples… Derick wrote: I'm still -1 on it. It makes absolutely unreadable code (yes, also in JavaScript with f.e. MongoDB). Here's an actual snippet from my production code (which interfaces

[PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-05-31 Thread fgm
Voting in favor of a short syntax, as a mostly userland dev, seems a no-brainer, but both suggested syntaxes and patches are rather unnatural: they attempt to mimic JSON syntax, but do not go the whole way. The second syntax, possibly more natural to PHP devs, might well be more trouble

[PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-05-31 Thread Marcel Esser
From the perspective of someone that's just trying to get stuff done: $packet = array('response' = array('status' = 1,'message' = ''),'data' = array('id' = 1, 'username' = 'john doe')); $packet = ['response': ['status': 1, 'message': '', 'data': ['id': 1, 'username': 'john doe'] ] ]; The

Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-05-31 Thread Michael Shadle
I've always considered json an awesome machine to machine interchange format (the most efficient one) but not the easiest to read for configuration or manually defining anything. I see nothing wrong with the initial example. Has worked well for years. :) On May 31, 2011, at 3:43 PM, Marcel

Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-05-31 Thread Marcel Esser
Yeah, you'll note I am not actually advocating making a full JSON implementation in the PHP language. However, as per your point, JSON is no longer just a machine interchange format. It's many other things these days, including a query definition protocol. It's unlikely that the number of systems

Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-05-31 Thread Dan Birken
+1 To be honest, ['a': 'b'] or ['a' = 'b'] is so much better than array('a' = 'b') for general use I don't even care which one is picked, as long as one of them is picked. -Dan On Tue, May 31, 2011 at 3:43 PM, Marcel Esser marcel.es...@croscon.comwrote: From the perspective of someone that's

Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-05-31 Thread dukeofgaming
On Tue, May 31, 2011 at 7:29 PM, Dan Birken bir...@gmail.com wrote: +1 To be honest, ['a': 'b'] or ['a' = 'b'] is so much better than array('a' = 'b') for general use I don't even care which one is picked, as long as one of them is picked. -Dan +1 to that too. Even when I've never liked

Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-05-31 Thread Etienne Kneuss
+1 for a short array syntax. But only if you keep it consistent, PHP has always been using = for key/val association, I don't see any reason to suddenly provide key: val, unless what you want is to confuse people. On Wed, Jun 1, 2011 at 02:42, dukeofgaming dukeofgam...@gmail.com wrote: On Tue,

Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-05-31 Thread Rasmus
On 05/31/2011 05:42 PM, dukeofgaming wrote: I'm afraid that if : is associated with the JSON interop argument and the later is discarded then : will be discarded too, much like what happened with the echo shortcut (?=) and the short tags (?). Perhaps the idea of JSON interop could be taken to

Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-05-31 Thread Adam Harvey
On 1 June 2011 08:57, Etienne Kneuss col...@php.net wrote: +1 for a short array syntax. But only if you keep it consistent, PHP has always been using = for key/val association, I don't see any reason to suddenly provide key: val, unless what you want is to confuse people. Agreed here: +1 for

Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (redux)

2011-05-31 Thread dukeofgaming
On Tue, May 31, 2011 at 9:27 PM, Rasmus ras...@lerdorf.com wrote: On 05/31/2011 05:42 PM, dukeofgaming wrote: I'm afraid that if : is associated with the JSON interop argument and the later is discarded then : will be discarded too, much like what happened with the echo shortcut (?=)