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 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 > > >

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 ve

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 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 won't be > interpreted by

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

2011-06-06 Thread Matthew Weier O'Phinney
On 2011-06-01, Sean Coates 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 application is

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

2011-06-06 Thread Matthew Weier O'Phinney
On 2011-06-01, Michael Shadle wrote: > On Wed, Jun 1, 2011 at 3:09 PM, Sean Coates 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

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

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 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 won't be > interpreted by P

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

2011-06-04 Thread David Zülke
From: David Zülke [mailto:david.zue...@bitextender.com] > Sent: Friday, June 03, 2011 6:11 PM > To: Andrei Zmievski > Cc: Martin Scotta; Sean Coates; Anthony Ferrara; PHP internals > Subject: Re: [PHP-DEV] RFC: Short syntax for Arrays (redux) > > It's not FUD. > &

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 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: > > $chr = "\xC3\xA4"; // "ä" as UTF-8 > var_dump(json_decode('["' . $chr . '\u00e4"]')

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

2011-06-03 Thread John Crenshaw
Message- From: David Zülke [mailto:david.zue...@bitextender.com] Sent: Friday, June 03, 2011 6:11 PM To: Andrei Zmievski Cc: Martin Scotta; Sean Coates; Anthony Ferrara; PHP internals Subject: Re: [PHP-DEV] RFC: Short syntax for Arrays (redux) It's not FUD. It is different from writing j

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: That'll produce: > array(1) { > [0]=> > string(4) "ää" > } > NULL Understand what the problem is now? If someone does this in a latin1-encod

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 | http://

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, vi

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 Eloy Bote Falcon
a, 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) > > > > > > 201

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 pa

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 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) lik

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 o

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 enco

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

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 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 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 De

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 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 which syntax

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, Se

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 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 m

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

2011-06-02 Thread John Crenshaw
es with you) stop fussing about it. John Crenshaw Priacta, 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 mail

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 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 wrote: > https://wiki.php.net/rfc/shortsyntaxforarrays -- Pierre @pierrejoye | http://blog.thepimp.net |

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

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

2011-06-02 Thread David Coallier
Even though I have quite mixed feelings about this, I think I am finally ready to cast my +1. Over the past few days I've discussed with a few people and noticed the need, or rather a strong desire to have this feature in PHP and most people seemed to care only little about how it was done as long

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

2011-06-02 Thread Arvids Godjuks
2011/6/2 Ford, Mike : >> -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 different

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 o

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 invo

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 > wrote: > > > I modified the vote page, pls move your votes to the desired > syntax > > (or global -1) > > This is a good idea to group thin

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

2011-06-02 Thread Eloy Bote Falcon
2011/6/2 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 >

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 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. >

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

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

2011-06-01 Thread David Zülke
>>> ); >>> >>> Vs. the JSON form: >>> $query = { >>> time: {'$and': [ >>> {'$gt': strtotime('-1 day')}, >>> {'$lt': time()}, >>> ]}, >>> '$or': [ >

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

2011-06-01 Thread Matt Wilson
represents. > > John Crenshaw > Priacta, Inc. > > -Original Message- > From: dukeofgaming [mailto:dukeofgam...@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: Shor

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

2011-06-01 Thread John Crenshaw
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 to write you "jsony" object/array with single qu

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

2011-06-01 Thread Marcel Esser
gt;>{'$gt': strtotime('-1 day')}, >>{'$lt': time()}, >> ]}, >>'$or': [ >>{foo: 'bar'}, >>{hello: 'world'} >>] >> }; >> >> Because of the clear re

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 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 netiquette and every developers her

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 m

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

2011-06-01 Thread David Zülke
gt; Because of the clear 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: W

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 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 many other serializatio

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

2011-06-01 Thread John Crenshaw
PHP internals 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,

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

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: http://www.php.net/u

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 or

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 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 and then $foo = js

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 lea

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 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 to sign > up. In this

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

2011-06-01 Thread John Crenshaw
;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 focusing on a character savi

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
, Inc. -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

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),    'unluckyNumber

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 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 do care about is

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 wrote: > On Wed, Jun 1, 2011 at 1:01 PM, Pierre Joye wrote: > > 5 character difference for each array being saved. That's it. At the > expense of syntax highlighters, IDEs, books, all becoming outdated and > need to be updated. For a language

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 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 (which

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 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 things? Old: $foo = a

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 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 qu

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 Pierre Joye
On Wed, Jun 1, 2011 at 9:43 PM, dukeofgaming 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 json and obje

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 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?. > > > > >

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 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 consider that non

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 tha

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 wrote: > On Wed, Jun 1, 2011 at 12:19 PM, Pierre Joye wrote: > >> Reminder: Pls add your votes here: >> https://wik

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 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, David Vega

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 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 vo

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 n

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 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 Development Mai

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 wrote: > https://wiki.php.net/rfc/shortsyntaxforarrays > > Since this was brought again recently by Rasmus > (http://markmail.org/message/fx3brcm4ekh645se) and on Twit

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 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 seemed to reve

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 Lis

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 Ret

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, Jun

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 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
can we please (please!) focus on voting on the RFC and avoid an enumeration of all possible syntax, formats, ideas, trolls&co 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 wrote: > My kneejerk reaction to t

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 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 defin

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 lear

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 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 currently used for arra

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 : > 2011/5/31 Brian Moon : >> https://wiki.php.net/rfc/shortsyntaxforarrays >> >> Since this was brou

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

2011-06-01 Thread Patrick ALLAERT
2011/5/31 Brian Moon : > 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 well (with ca

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 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 : > 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 well (with ca

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 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

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

2011-05-31 Thread Lester Caine
Michael Maclean wrote: https://wiki.php.net/rfc/shortsyntaxforarrays Since this was brought again recently by Rasmus 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 other

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

2011-05-31 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-05-31 Thread dukeofgaming
On Wed, Jun 1, 2011 at 12:35 AM, Michael Shadle wrote: > I don't really want to stand on my soapbox any longer, as it's obvious > where the crowd leans on this one, but I need to clarify a couple > points a bit and feel obligated to reply to another. > > On Tue, May 31, 2011 at 10:15 PM, Stas Mal

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

2011-05-31 Thread Michael Shadle
I don't really want to stand on my soapbox any longer, as it's obvious where the crowd leans on this one, but I need to clarify a couple points a bit and feel obligated to reply to another. On Tue, May 31, 2011 at 10:15 PM, Stas Malyshev wrote: > Fundamental changes means "throw out your product

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

2011-05-31 Thread dukeofgaming
Also, take a peak at this: http://www.phpsadness.com/sad/45 And compare it with this: http://perldoc.perl.org/perldsc.html#Declaration-of-a-HASH-OF-COMPLEX-RECORDS Regards, David Vega On Wed, Jun 1, 2011 at 12:15 AM, Stas Malyshev wrote: > Hi! > > > I agree, it would be a break a lot of code.

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

2011-05-31 Thread Stas Malyshev
Hi! I agree, it would be a break a lot of code. But I'd rather see some fundamental changes at that level (call it PHP 6, make it not BC with PHP 5.x or earlier), and remove the cruft and standardize on some of the slop. Fundamental changes means "throw out your production code and start deve

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

2011-05-31 Thread Gwynne Raskind
+1 On May 31, 2011, at 2:42 PM, Brian Moon 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 seemed to reverse

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

2011-05-31 Thread Michael Shadle
On Tue, May 31, 2011 at 3:06 PM, Rasmus wrote: > Because most of those can't be done without breaking millions of lines > of code out there. And a couple of people worked on Unicode for years > and got very little support. That is not a small project. This short > syntax for arrays is probably th

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

2011-05-31 Thread Philip Olson
On May 31, 2011, at 3:06 PM, Rasmus wrote: > On 05/31/2011 02:59 PM, Michael Shadle wrote: >> Forgive me for injecting my $.02 here but what is the original reason >> for changing the most basic language syntax to be a little bit >> shorter? >> >> Is it hurting anyone to type out "array()" or so

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

2011-05-31 Thread Justin Carmony
I agree with this. So the idea would be adding short hand object notation for PHP, inspired by JSON, but we also allow for associative arrays. So: $object = { 'var1': 'one', 'var2': 'two' }; // for an object $assoc_array = [ 'var1': 'one', 'var2': 'two' ]; // for an array // even mix and match

  1   2   >