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 t
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
wit
>> 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"
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 dis
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
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 resear
On Jun 1, 2011, at 7:30 AM, Ilia Alshanetsky wrote:
> On Wed, Jun 1, 2011 at 4:27 PM, 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).
>>
>>
On Wed, Jun 1, 2011 at 4:27 PM, 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 interfa
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):
http://paste.roguecoders.com/p/0747f
On 2011-05-31, Brian Moon 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
>
> Contra:
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 s
ct that uses MongoDB.)
John Crenshaw
Priacta, Inc.
-----Original Message-
From: dukeofgaming [mailto:dukeofgam...@gmail.com]
Sent: Wednesday, June 01, 2011 5:51 AM
To: Ford, Mike
Cc: Etienne Kneuss; internals@lists.php.net
Subject: Re: [PHP-DEV] Re: RFC: Short syntax for Arrays (red
}" be implemented for objects too then?.
>
> Regards,
>
> David
>
> On Wed, Jun 1, 2011 at 4:36 AM, Ford, Mike wrote:
>
>> > -Original Message-
>> > From: ekne...@gmail.com [mailto:ekne...@gmail.com] On Behalf Of
>> > Etienne Kneuss
>>
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
> -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.
>
On Tue, May 31, 2011 at 9:27 PM, Rasmus 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 (" idea
> >
On 1 June 2011 08:57, Etienne Kneuss 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 shor
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 (" of JSON interop could be taken to another RFC and get less noise and be
+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 wrote:
> On Tue, May 31, 2011 at 7
On Tue, May 31, 2011 at 7:29 PM, Dan Birken 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 that
+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 wrote:
> From the perspective of someone that's just trying to get stu
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
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 Ess
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
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 tha
25 matches
Mail list logo