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

2011-06-06 Thread David Zülke
On 04.06.2011, at 02:43, John Crenshaw wrote: This is a moot point. You wouldn't send that to json_decode. You would send it to json_encode. In other words json_decode({yay: ä}) is totally wrong in the first place, because json_decode requires a string, not an object. Just to quickly make

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

2011-06-06 Thread Matthew Weier O'Phinney
On 2011-06-01, Michael Shadle mike...@gmail.com wrote: On Wed, Jun 1, 2011 at 3:09 PM, Sean Coates s...@seancoates.com wrote: This is not about saving five characters every time I type array(), it's about making my systems all work together in a way that's a little less abstracted, and a lot

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

2011-06-06 Thread Matthew Weier O'Phinney
On 2011-06-01, Sean Coates s...@seancoates.com wrote: Now, the only reason I would personally support the array shortcut is if it was an implementation of JSON. I know that's not on the table here I don't think anything is officially off the table, unless we forego discussion. My

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

2011-06-06 Thread John Crenshaw
On Sat, Jun 4, 2011 at 4:52 AM, David Zülke david.zue...@bitextender.com wrote: Yes, I know. Then why are you and others demanding that the resulting syntax be fully compatible with JSON so it could be parsed by other JSON parsers? That makes no sense at all. A file with just [foo] in it

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

2011-06-06 Thread David Zülke
On 06.06.2011, at 20:03, John Crenshaw wrote: The desire is to be able to copy/paste things back and forth and make it work with only minor tweaks. That sounds like a problem an IDE should solve, and not the language itself. And again... there are potential encoding problems, plus single

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

2011-06-06 Thread Martin Scotta
Martin Scotta On Mon, Jun 6, 2011 at 3:03 PM, Matthew Weier O'Phinney weierophin...@php.net wrote: On 2011-06-01, Sean Coates s...@seancoates.com wrote: Now, the only reason I would personally support the array shortcut is if it was an implementation of JSON. I know that's not on the

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

2011-06-05 Thread Andrei Zmievski
On Sat, Jun 4, 2011 at 4:52 AM, David Zülke david.zue...@bitextender.com wrote: Yes, I know. Then why are you and others demanding that the resulting syntax be fully compatible with JSON so it could be parsed by other JSON parsers? That makes no sense at all. A file with just [foo] in it

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

2011-06-03 Thread Eloy Bote Falcon
...@gmail.com] *Sent:* Thursday, June 02, 2011 3:58 AM *To:* Sanford Whiteman *Cc:* John Crenshaw; PHP internals *Subject:* Re: [PHP-DEV] RFC: Short syntax for Arrays (redux) 2011/6/2 Sanford Whiteman swhitemanlistens-softw...@cypressintegrated.com I don't think anyone cares about JSON

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

2011-06-03 Thread Derick Rethans
On Tue, 31 May 2011, Brian Moon wrote: Contra: Antony Dovgal, Derick Rethans, Jani Taskinen, Lokrain, Felipe Pena, Lukas Kahwe Smith, Marcus Boerger, David Soria Parra, Johannes Schlüter, Maciek Sokolewicz, Philip Olson, Ilia Alshanetsky, Daniel Brown, Jochem Maas, Hannes Magnusson, David

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

2011-06-03 Thread Derick Rethans
On Wed, 1 Jun 2011, Pierre Joye wrote: pls add your svn handle in the right section: https://wiki.php.net/rfc/shortsyntaxforarrays/vote Voting does not belong on some wiki. It belongs here on the mailinglist. Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe,

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

2011-06-03 Thread Derick Rethans
On Thu, 2 Jun 2011, David Zülke wrote: Just because the MongoDB developers were stupid enough to build a query language on top of JSON does not mean that JSON or JavaScript object literals need to be supported in PHP. Can't agree more there. Derick -- http://derickrethans.nl |

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

2011-06-03 Thread David Zülke
It's not FUD. It is different from writing json_decode('ä\u0123'), because json_decode() in PHP only accepts UTF-8 encoded input; Give it a shot: ?php $chr = \xC3\xA4; // ä as UTF-8 var_dump(json_decode('[' . $chr . '\u00e4]')); var_dump(json_decode('[' . utf8_decode($chr) . '\u00e4]')); ?

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

2011-06-03 Thread Andrei Zmievski
On Fri, Jun 3, 2011 at 3:11 PM, David Zülke david.zue...@bitextender.com wrote: It's not FUD. It is different from writing json_decode('ä\u0123'), because json_decode() in PHP only accepts UTF-8 encoded input; Give it a shot: ?php $chr = \xC3\xA4; // ä as UTF-8 var_dump(json_decode('['

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

2011-06-02 Thread Ferenc Kovacs
On Thu, Jun 2, 2011 at 12:09 AM, Sean Coates s...@seancoates.com wrote: Now, the only reason I would personally support the array shortcut is if it was an implementation of JSON. I know that's not on the table here I don't think anything is officially off the table, unless we forego

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

2011-06-02 Thread Eloy Bote Falcon
2011/6/2 Sanford Whiteman swhitemanlistens-softw...@cypressintegrated.com I don't think anyone cares about JSON for the sake of being perfect JSON, I didn't intend to give that impression. Then you should stop saying pure JSON and true JSON constantly! I'm only hoping for something

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

2011-06-02 Thread Ford, Mike
-Original Message- From: Michael Shadle [mailto:mike...@gmail.com] Sent: 01 June 2011 21:37 On Wed, Jun 1, 2011 at 1:01 PM, Pierre Joye pierre@gmail.com wrote: I modified the vote page, pls move your votes to the desired syntax (or global -1) This is a good idea to

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

2011-06-02 Thread Alain Williams
On Thu, Jun 02, 2011 at 08:21:37AM +, Ford, Mike wrote: Back on the soapbox. All of this is just to reduce typing array (5 characters) before things? Not here. For me, the shorter syntax is simply an order of magnitude more readable. I really don't care how much typing is involved +1

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

2011-06-02 Thread Ford, Mike
-Original Message- From: John Crenshaw [mailto:johncrens...@priacta.com] Sent: 01 June 2011 23:00 Spot on. It has nothing to do with extra typing (and that sort of design is part of what ruined Ruby). My fingers move plenty fast and if extra characters make things more safe or more

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

2011-06-02 Thread Arvids Godjuks
2011/6/2 Ford, Mike m.f...@leedsmet.ac.uk: -Original Message- From: John Crenshaw [mailto:johncrens...@priacta.com] Sent: 01 June 2011 23:00 skip 4. The format most consistent with other languages is JSON Again, matter of experience. Last time I counted, I'd used upward of 30

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

2011-06-02 Thread Martin Scotta
Could we first go out with fully JSON compatible version for 5.4? and then later decide the = stuff based on how that worked. Native JSON is a big stuff for userland, and I'm pretty sure it will bring a hole of core version upgrades. Martin Scotta On Wed, Jun 1, 2011 at 7:09 PM, Sean Coates

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

2011-06-02 Thread Pierre Joye
reminder #2, pls do vote here: https://wiki.php.net/rfc/shortsyntaxforarrays/vote some devs still did not choose which syntax they want. Thanks, On Tue, May 31, 2011 at 8:42 PM, Brian Moon br...@moonspot.net wrote: https://wiki.php.net/rfc/shortsyntaxforarrays -- Pierre @pierrejoye |

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

2011-06-02 Thread Sanford Whiteman
Also matter of opinion, and of experience. Apart from the fact that my use of jQuery amounts to a few weeks out of a (mumble)-year programming career, no I don't use pure JSON for it - Javascript object literals, yes, but not pure JSON. It's not just you. The claim that people

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

2011-06-02 Thread John Crenshaw
, Inc. From: Eloy Bote Falcon [mailto:eloyb...@gmail.com] Sent: Thursday, June 02, 2011 3:58 AM To: Sanford Whiteman Cc: John Crenshaw; PHP internals Subject: Re: [PHP-DEV] RFC: Short syntax for Arrays (redux) 2011/6/2 Sanford Whiteman swhitemanlistens-softw

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

2011-06-02 Thread David Zülke
No we can't; I already explained why in another email last night. Copypasta: json_decode() can deal with Unicode sequences because decodes to UTF-8. That is not possible in a language construct: What if I do this, in a latin1 encoded file: $x = {foo: ä, bar: \u0123} Should that then give

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

2011-06-02 Thread Sean Coates
pls do vote here: https://wiki.php.net/rfc/shortsyntaxforarrays/vote some devs still did not choose which syntax they want. If people vote on this now, will further discussion about how this SHOULD work be shut down with we already voted on this? S

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

2011-06-02 Thread Pierre Joye
which other discussions do you wish? Json is clearly not an option and not enough people (but a couple) likes or wants it. The RFC is about short array syntax and as far as I can see there is already a clear consensus for one of the proposed new syntax. Cheers, On Thu, Jun 2, 2011 at 9:53 PM,

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

2011-06-02 Thread Pierre Joye
so put +1 on both :D On Thu, Jun 2, 2011 at 9:37 PM, Brian Moon br...@moonspot.net wrote: On 6/2/11 11:08 AM, Pierre Joye wrote: reminder #2, pls do vote here: https://wiki.php.net/rfc/shortsyntaxforarrays/vote some devs still did not choose which syntax they want. I don't really care

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

2011-06-02 Thread Brian Moon
On 6/2/11 11:08 AM, Pierre Joye wrote: reminder #2, pls do vote here: https://wiki.php.net/rfc/shortsyntaxforarrays/vote some devs still did not choose which syntax they want. I don't really care which syntax wins as long as one of them gets rolled in. Brian. -- PHP Internals - PHP Runtime

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

2011-06-02 Thread Sanford Whiteman
There's no need to be rude. If you can't make your point without attacking people, then you need a better argument. If you can't make your point without misusing terms to the point of making yourself untrustworthy on that level alone, stop trying to argue. The lazy programmer axiom

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

2011-06-02 Thread Stas Malyshev
Hi! https://wiki.php.net/rfc/shortsyntaxforarrays/vote some devs still did not choose which syntax they want. Just to be clear on my vote, I'd really like to have [], and I think we MUST keep = there, but I don't care either way about ':'. -- Stanislav Malyshev, Software Architect SugarCRM:

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

2011-06-02 Thread Sean Coates
If people vote on this now, will further discussion about how this SHOULD work be shut down with we already voted on this? which other discussions do you wish? Json is clearly not an option and not enough people (but a couple) likes or wants it. The RFC is about short array syntax and as

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

2011-06-02 Thread Andrei Zmievski
Stop spreading FUD, please. It's no different than writing json_decode(ä\u0123). Your statement, the stuff in bar in UTF-8 is wrong. The \u0123 escape sequence is a representation of a Unicode character, not the character itself. This representation can be encoded in any ASCII-compatible

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

2011-06-02 Thread Philip Olson
On Jun 2, 2011, at 1:19 PM, Sean Coates wrote: If people vote on this now, will further discussion about how this SHOULD work be shut down with we already voted on this? which other discussions do you wish? Json is clearly not an option and not enough people (but a couple) likes or wants it.

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

2011-06-02 Thread Pierre Joye
On Thu, Jun 2, 2011 at 10:19 PM, Sean Coates s...@seancoates.com wrote: If people vote on this now, will further discussion about how this SHOULD work be shut down with we already voted on this? which other discussions do you wish? Json is clearly not an option and not enough people (but a

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

2011-06-02 Thread dukeofgaming
State the case for JSON in a separate RFC and progress will be made, but I think there is a fundamental mistake here: serialization formats are the *means* for interoperability, not the ends. The only way I see JSONy syntax would help is if PHP code —with JSONy syntax— would be parsed by a JSON

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

2011-06-01 Thread Stas Malyshev
Hi! If a handful of experienced people decided to go forward with my crackpot idea above, would you be in support, just because they are? No, but I wouldn't say that nobody needs it. I'd say it's a bad idea despite somebody needing it, for reasons so and so. I figured it was tough, based

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

2011-06-01 Thread Lester Caine
Michael Maclean wrote: https://wiki.php.net/rfc/shortsyntaxforarrays Since this was brought again recently by Rasmus snip I'm all for this, though I would confess to having a preference for the second syntax: $arr = [ 'foo' = 'bar', 'baz' = 'foo' ] seems to fit better with PHP than the

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

2011-06-01 Thread Peter Cowburn
+1 from me to *any* of the short-form suggestions (JSON or otherwise). On 31 May 2011 19:42, Brian Moon br...@moonspot.net wrote: https://wiki.php.net/rfc/shortsyntaxforarrays Since this was brought again recently by Rasmus (http://markmail.org/message/fx3brcm4ekh645se) and on Twitter where

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

2011-06-01 Thread Patrick ALLAERT
2011/5/31 Brian Moon br...@moonspot.net: https://wiki.php.net/rfc/shortsyntaxforarrays Since this was brought again recently by Rasmus (http://markmail.org/message/fx3brcm4ekh645se) and on Twitter where several people including Andi chimed in on it and Ilia seemed to reverse his thoughts as

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

2011-06-01 Thread Ferenc Kovacs
On Tue, May 31, 2011 at 8:42 PM, Brian Moon br...@moonspot.net wrote: https://wiki.php.net/rfc/shortsyntaxforarrays +1 for the current patch. Tyrael

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

2011-06-01 Thread Patrick ALLAERT
2011/5/31 Brian Moon br...@moonspot.net: https://wiki.php.net/rfc/shortsyntaxforarrays Since this was brought again recently by Rasmus (http://markmail.org/message/fx3brcm4ekh645se) and on Twitter where several people including Andi chimed in on it and Ilia seemed to reverse his thoughts as

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

2011-06-01 Thread Arvids Godjuks
Holly crap, god save us from that. +1 on short syntax (personally I try to avoid it in JS too - I use new Array() or JSON), but no : please. It's just ridiculous for PHP. 2011/6/1 Patrick ALLAERT patrick.alla...@gmail.com: 2011/5/31 Brian Moon br...@moonspot.net:

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

2011-06-01 Thread Gustavo Lopes
Em Tue, 31 May 2011 19:42:18 +0100, Brian Moon br...@moonspot.net escreveu: https://wiki.php.net/rfc/shortsyntaxforarrays -1 I see very little benefit, specially in my keyboard layout, where typing [ and ] requires pressing Alt Gr + 8/9. Plus, it can cause confusion because [] is

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

2011-06-01 Thread Arvids Godjuks
My personal feel about this is that yes, short arrays are not bad, but things like $a = new A; $a[array()]; just scare the crap of me when I see them. To me PHP is easy on syntax and it's good. When I see Ruby or Python code with all it's crazy magic I feel sick. Still one day I will have to

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

2011-06-01 Thread Marcel Esser
My kneejerk reaction to this, as no one particularly important, is to not allow mixing those syntaxes. I looked at the RFC a minute ago, and I read a reference to a parallel solution to this being named parameters. Which, I think, is not accurate. The problem with the array() notation is

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

2011-06-01 Thread Sebastian Bergmann
Am 31.05.2011 20:42, schrieb Brian Moon: https://wiki.php.net/rfc/shortsyntaxforarrays -1 -- Sebastian BergmannCo-Founder and Principal Consultant http://sebastian-bergmann.de/ http://thePHP.cc/ -- PHP Internals - PHP Runtime Development Mailing

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

2011-06-01 Thread Pierre Joye
can we please (please!) focus on voting on the RFC and avoid an enumeration of all possible syntax, formats, ideas, trollsco we had in the last decade? Simply vote and let us move one. Thanks for your understanding, On Wed, Jun 1, 2011 at 2:05 PM, Marcel Esser marcel.es...@croscon.com wrote: My

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

2011-06-01 Thread Pierre Joye
pls add your svn handle in the right section: https://wiki.php.net/rfc/shortsyntaxforarrays/vote On Wed, Jun 1, 2011 at 2:08 PM, Sebastian Bergmann sebast...@php.net wrote: Am 31.05.2011 20:42, schrieb Brian Moon: https://wiki.php.net/rfc/shortsyntaxforarrays  -1 -- Sebastian Bergmann      

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

2011-06-01 Thread Pierre Joye
btwr, I did not mean to kill the discussions but it would be awesome if every participant would read the past discussions about this RFC and replies accordingly. Yes, there are alternatives and other needs related to this RFC, but it is really time to go with it or forget it. Cheers, On Wed,

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

2011-06-01 Thread Antony Dovgal
On 06/01/2011 01:59 AM, Rasmus wrote: Other than a couple of grumpy old-timers, I think we are in agreement that we should add a short array syntax. Well, thanks for calling me that! =) But seriously, I don't think all of these people are grumpy old-timers: Contra: Antony Dovgal, Derick

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

2011-06-01 Thread Antony Dovgal
On 05/31/2011 10:42 PM, Brian Moon wrote: https://wiki.php.net/rfc/shortsyntaxforarrays I can has vote on this RFC https://wiki.php.net/rfc/shortsyntaxforfunctions ? -- Wbr, Antony Dovgal --- http://pinba.org - realtime statistics for PHP -- PHP Internals - PHP Runtime Development Mailing

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

2011-06-01 Thread Jonathan Wage
+1 On Tue, May 31, 2011 at 1:42 PM, Brian Moon br...@moonspot.net wrote: https://wiki.php.net/rfc/shortsyntaxforarrays Since this was brought again recently by Rasmus ( http://markmail.org/message/fx3brcm4ekh645se) and on Twitter where several people including Andi chimed in on it and Ilia

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

2011-06-01 Thread Pierre Joye
Reminder: Pls add your votes here: https://wiki.php.net/rfc/shortsyntaxforarrays/vote On Tue, May 31, 2011 at 8:42 PM, Brian Moon br...@moonspot.net wrote: https://wiki.php.net/rfc/shortsyntaxforarrays Since this was brought again recently by Rasmus

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

2011-06-01 Thread Chris Stockton
Hello, On Wed, Jun 1, 2011 at 10:19 AM, Pierre Joye pierre@gmail.com wrote: Reminder: Pls add your votes here: https://wiki.php.net/rfc/shortsyntaxforarrays/vote May I please have wiki rights restored to my user cstockton if possible, I would like to vote. -- PHP Internals - PHP Runtime

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

2011-06-01 Thread Lester Caine
Chris Stockton wrote: Reminder: Pls add your votes here: https://wiki.php.net/rfc/shortsyntaxforarrays/vote May I please have wiki rights restored to my user cstockton if possible, I would like to vote. It would seem some people have not been watching the news? http://www.php.net/ top news

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

2011-06-01 Thread Chris Stockton
Hi Lester, On Wed, Jun 1, 2011 at 11:19 AM, Lester Caine les...@lsces.co.uk wrote: Chris Stockton wrote: Reminder: Pls add your votes here:  https://wiki.php.net/rfc/shortsyntaxforarrays/vote May I please have wiki rights restored to my user cstockton if possible, I would like to vote.

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

2011-06-01 Thread dukeofgaming
On Wed, Jun 1, 2011 at 12:19 PM, Pierre Joye pierre@gmail.com wrote: Reminder: Pls add your votes here: https://wiki.php.net/rfc/shortsyntaxforarrays/vote Who is allowed to vote?, are userland votes still going to count?, if so, how does one qualify as userland voter?. Best regards,

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

2011-06-01 Thread guilhermebla...@gmail.com
I think the one that is active can be a voter. Or maybe the ones that have any karma on php environment is considered a voter. Cheers, On Wed, Jun 1, 2011 at 4:21 PM, dukeofgaming dukeofgam...@gmail.com wrote: On Wed, Jun 1, 2011 at 12:19 PM, Pierre Joye pierre@gmail.com wrote: Reminder:

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

2011-06-01 Thread Philip Olson
Reminder: Pls add your votes here: https://wiki.php.net/rfc/shortsyntaxforarrays/vote Who is allowed to vote?, are userland votes still going to count?, if so, how does one qualify as userland voter?. I think the one that is active can be a voter. Or maybe the ones that have any karma

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

2011-06-01 Thread Pierre Joye
On Wed, Jun 1, 2011 at 9:38 PM, Philip Olson phi...@roshambo.org wrote: I'm choosing to ignore this voting mechanism because it feels wrong. We always voted based on php.net accounts (@php.net that is), whether it is a good thing or not is another question and unrelated to this RFC (for one, I

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

2011-06-01 Thread dukeofgaming
On Wed, Jun 1, 2011 at 2:38 PM, Philip Olson phi...@roshambo.org wrote: Reminder: Pls add your votes here: https://wiki.php.net/rfc/shortsyntaxforarrays/vote Who is allowed to vote?, are userland votes still going to count?, if so, how does one qualify as userland voter?. I

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

2011-06-01 Thread Pierre Joye
On Wed, Jun 1, 2011 at 9:43 PM, dukeofgaming dukeofgam...@gmail.com wrote: Yup, it feels rushed. The RFC should be cleaned up and I think this are the main items: - Ditch : - Ditch the JSON topic or open a separate RFC with it - Introduce the { } syntax for objects and change the title Both

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

2011-06-01 Thread Ferenc Kovacs
David David who? :) David Vega

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

2011-06-01 Thread Philip Olson
On Jun 1, 2011, at 12:43 PM, Pierre Joye wrote: On Wed, Jun 1, 2011 at 9:38 PM, Philip Olson phi...@roshambo.org wrote: I'm choosing to ignore this voting mechanism because it feels wrong. We always voted based on php.net accounts (@php.net that is), whether it is a good thing or not

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

2011-06-01 Thread Michael Shadle
On Wed, Jun 1, 2011 at 1:01 PM, Pierre Joye pierre@gmail.com wrote: I modified the vote page, pls move your votes to the desired syntax (or global -1) This is a good idea to group things like this. Back on the soapbox. All of this is just to reduce typing array (5 characters) before

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

2011-06-01 Thread Justin Carmony
To address the soapbox: Its not just to reduce the five characters at the beginning, but when you have more complex structures as well. There was already a great example shown (http://paste.roguecoders.com/p/0747f2363c228a09e0ddd6f8ec52f2e8.html) of that. Also, if object support is added

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

2011-06-01 Thread Anthony Ferrara
Personally, I think focusing on a character savings is the wrong reason to take on any problem. I don't care how long it takes for me to type code. I don't care how much extra hdd space it takes. But what I do care about is how readable it is. To me, the array shortcut syntax is pointless. Do

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

2011-06-01 Thread Chris Stockton
Hello, On Wed, Jun 1, 2011 at 1:37 PM, Michael Shadle mike...@gmail.com wrote: On Wed, Jun 1, 2011 at 1:01 PM, Pierre Joye pierre@gmail.com wrote: 5 character difference for each array being saved. That's it. At the expense of syntax highlighters, IDEs, books, all becoming outdated and

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

2011-06-01 Thread Chris Stockton
Hello, On Wed, Jun 1, 2011 at 2:17 PM, Anthony Ferrara ircmax...@gmail.com wrote: Personally, I think focusing on a character savings is the wrong reason to take on any problem.  I don't care how long it takes for me to type code.  I don't care how much extra hdd space it takes.  But what I

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

2011-06-01 Thread Michael Shadle
First, why not go the opposite way and standardize the syntax - why not make object() or Object() work like array() or Array()? $person = object('name' = 'Justin',    'city' = 'ogden',    'state' = 'ut',    'country' = 'usa',    'favoriteNumbers' = array(4, 12, 37, 42),    'unluckyNumbers' =

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

2011-06-01 Thread John Crenshaw
. -Original Message- From: Chris Stockton [mailto:chrisstockto...@gmail.com] Sent: Wednesday, June 01, 2011 5:23 PM To: Michael Shadle Cc: Pierre Joye; PHP internals Subject: Re: [PHP-DEV] RFC: Short syntax for Arrays (redux) Hello, On Wed, Jun 1, 2011 at 1:37 PM, Michael Shadle mike

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

2011-06-01 Thread Sean Coates
Now, the only reason I would personally support the array shortcut is if it was an implementation of JSON. I know that's not on the table here I don't think anything is officially off the table, unless we forego discussion. My application is largely JSON-powered. We pass data from back- to

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

2011-06-01 Thread John Crenshaw
readability difference I'll take anything, but JSON would be much better than just an array shorthand. John Crenshaw Priacta, Inc. -Original Message- From: Anthony Ferrara [mailto:ircmax...@gmail.com] Sent: Wednesday, June 01, 2011 5:18 PM To: PHP internals Subject: Re: [PHP-DEV] RFC: Short

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

2011-06-01 Thread Pierre Joye
On Wed, Jun 1, 2011 at 11:59 PM, John Crenshaw johncrens...@priacta.com wrote: Spot on. It has nothing to do with extra typing (and that sort of design is part of what ruined Ruby). My fingers move plenty fast and if extra characters make things more safe or more readable, I'll be the first

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

2011-06-01 Thread Marcel Esser
I've been giving it some more thought, and really, the more I think about it, the more I am with Sean on the idea of having first-class JSON support. It really just makes sense. PHP is a web-oriented language, and we will all use it at some point. It's also very concise, and it's really easy to

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

2011-06-01 Thread Michael Shadle
On Wed, Jun 1, 2011 at 3:09 PM, Sean Coates s...@seancoates.com wrote: This is not about saving five characters every time I type array(), it's about making my systems all work together in a way that's a little less abstracted, and a lot less prone to error. Why not make your data in JSON

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

2011-06-01 Thread Marcel Esser
Parsing together strings that mix single and double quotes, variables, defined constants and etc, makes the problem significantly worse, not better. So, json_encode is not a solution at all. It's also not about PHP vs Node in any way; it's about interacting with APIs that make heavy use of JSON

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

2011-06-01 Thread Sean Coates
Why not make your data in JSON and then $foo = json_encode($data) ? For exactly the same reason people actually use callbacks efficiently, now that they don't have to create_function() them. S -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

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

2011-06-01 Thread Sanford Whiteman
Vs. the JSON form: { time: {'$and': [ {'$gt': strtotime('-1 day')}, {'$lt': time()}, ]}, '$or': [ {foo: 'bar'}, {hello: 'world'} ] } That isn't valid JSON for many different reasons... if you think that's pure JSON, you need to

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

2011-06-01 Thread John Crenshaw
Subject: Re: [PHP-DEV] RFC: Short syntax for Arrays (redux) Now, the only reason I would personally support the array shortcut is if it was an implementation of JSON. I know that's not on the table here I don't think anything is officially off the table, unless we forego discussion. My

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

2011-06-01 Thread Pierre Joye
On Thu, Jun 2, 2011 at 12:22 AM, Marcel Esser marcel.es...@croscon.com wrote: It's also not about PHP vs Node in any way; it's about interacting with APIs that make heavy use of JSON or JSON-superset notations. PHP supports json since years, http://www.php.net/json_decode / encode, as well as

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

2011-06-01 Thread David Zülke
be much better than just an array shorthand. John Crenshaw Priacta, Inc. -Original Message- From: Anthony Ferrara [mailto:ircmax...@gmail.com] Sent: Wednesday, June 01, 2011 5:18 PM To: PHP internals Subject: Re: [PHP-DEV] RFC: Short syntax for Arrays (redux) Personally, I think

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

2011-06-01 Thread dukeofgaming
I still don't get it, the idea of making it look like json wont make it json, it will be PHP, and if you dare to write you jsony object/array with single quoted strings wont break the code even when its not JSON. I'll say it again: not even Javascript supports 100% valid JSON. I'll say it even

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

2011-06-01 Thread Pierre Joye
hi David, On Thu, Jun 2, 2011 at 12:47 AM, David Zülke david.zue...@bitextender.com wrote: Just because the MongoDB developers were stupid enough to build a query language on top of JSON Many of us know that you have a deep and constant hate for MongoDB. However please do respect the

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

2011-06-01 Thread Marcel Esser
internals Subject: Re: [PHP-DEV] RFC: Short syntax for Arrays (redux) Personally, I think focusing on a character savings is the wrong reason to take on any problem. I don't care how long it takes for me to type code. I don't care how much extra hdd space it takes. But what I do care about is how

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

2011-06-01 Thread John Crenshaw
Ferrara; PHP internals Subject: Re: [PHP-DEV] RFC: Short syntax for Arrays (redux) I still don't get it, the idea of making it look like json wont make it json, it will be PHP, and if you dare to write you jsony object/array with single quoted strings wont break the code even when its not JSON

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

2011-06-01 Thread Matt Wilson
...@gmail.com] Sent: Wednesday, June 01, 2011 6:52 PM To: Michael Shadle Cc: Sean Coates; Anthony Ferrara; PHP internals Subject: Re: [PHP-DEV] RFC: Short syntax for Arrays (redux) I still don't get it, the idea of making it look like json wont make it json, it will be PHP, and if you dare

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

2011-06-01 Thread David Zülke
- From: Anthony Ferrara [mailto:ircmax...@gmail.com] Sent: Wednesday, June 01, 2011 5:18 PM To: PHP internals Subject: Re: [PHP-DEV] RFC: Short syntax for Arrays (redux) Personally, I think focusing on a character savings is the wrong reason to take on any problem. I don't care how long it takes

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

2011-06-01 Thread Sanford Whiteman
I don't think anyone cares about JSON for the sake of being perfect JSON, I didn't intend to give that impression. Then you should stop saying pure JSON and true JSON constantly! I'm only hoping for something that generally works on par with all the other JSON parsers in the world. OK,

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

2011-05-31 Thread Sean Coates
I'm one of the people who've brought it up on Twitter. Today's discussion seems to have earned some traction, which is a step in the right direction, I believe. I would prefer (as Rasmus pointed out) not to start a long discussion about it. Primarily I would be curious if anyone on the lists

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

2011-05-31 Thread guilhermebla...@gmail.com
+1 On Tue, May 31, 2011 at 3:52 PM, Sean Coates s...@seancoates.com wrote: I'm one of the people who've brought it up on Twitter. Today's discussion seems to have earned some traction, which is a step in the right direction, I believe. I would prefer (as Rasmus pointed out) not to start a

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

2011-05-31 Thread Philip Olson
A few notes worth mentioning: - That RFC moved from fail to 'under discussion' a few weeks ago, although it hasn't been edited - Most people are now for it, or at least that's the general feeling on IRC (#php.pecl) these past few weeks - Discussing it is on the 5.4 TODO (

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

2011-05-31 Thread Justin Carmony
This is my first time posting to the mailing list, been lurking for a little while, but I would like to throw in my thoughts. I've written about the idea of PHP supporting JSON notation on my blog before (http://www.justincarmony.com/blog/2011/04/12/php-itch-to-scratch-object-notation/), and I

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

2011-05-31 Thread Rafael Dohms
I would prefer (as Rasmus pointed out) not to start a long discussion about it. Primarily I would be curious if anyone on the lists (from the RFC wiki page) below would like to change your vote or if you are not listed below and would like to be counted, that would be great too. i'm a +1,

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

2011-05-31 Thread Stas Malyshev
Hi! At risk of turning this into a longer-than-necessary discussion, I believe a new RFC is required at this point. Making [ and ] work as (T_ARRAY, '(') and (')'), respectively is no longer good enough, for the main reason you've pointed out: JSON is becoming ubiquitous; actual first-class

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

2011-05-31 Thread Mike van Riel
On 05/31/2011 08:52 PM, Sean Coates wrote: I'm one of the people who've brought it up on Twitter. Today's discussion seems to have earned some traction, which is a step in the right direction, I believe. I would prefer (as Rasmus pointed out) not to start a long discussion about it.

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

2011-05-31 Thread Sebastian Krebs
This is (as far as I remember) my first mail on this list and I don't really know, how the voting process works. I guess its free4all, so ... Am 31.05.2011 20:42, schrieb Brian Moon: I would prefer (as Rasmus pointed out) not to start a long discussion about it. Primarily I would be curious

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

2011-05-31 Thread Chris Stockton
Hello, On Tue, May 31, 2011 at 11:42 AM, Brian Moon br...@moonspot.net wrote: https://wiki.php.net/rfc/shortsyntaxforarrays Since this was brought again recently by Rasmus (http://markmail.org/message/fx3brcm4ekh645se) and on Twitter where several people including Andi chimed in on it and

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

2011-05-31 Thread Rasmus
On 05/31/2011 11:52 AM, Sean Coates wrote: I'm one of the people who've brought it up on Twitter. Today's discussion seems to have earned some traction, which is a step in the right direction, I believe. I would prefer (as Rasmus pointed out) not to start a long discussion about it.

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

2011-05-31 Thread Stas Malyshev
Hi! Stas, I didn't understand your point about eval() and security. What did you mean? I meant if PHP has JSON syntax as native, e.g. you can say something like: $a = {a:b}; Then the temptation would be to write something like: // $json_string is {a:b} $a = eval($json_string); just as

  1   2   >