Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Marcus Boerger
Hello Andi, it is a bit harder to read and not the php way imo. best regards marcus Sunday, February 4, 2007, 8:25:22 AM, you wrote: Hi, I thought I may have brought this up a long time ago but couldn't find anything in the archives. For a long time already I've been thinking about

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread phpxcache
I think it's not worth doing unless there's overwhelming support as it's not desperately needed. But I'd be interested to hear people's thoughts. It seems implementation shouldn't be an issue but I'd have to dive a bit deeper. it sure acceptable for php users and will never be a conflict to

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Pierre
Hi Andi, On 2/4/07, Andi Gutmans [EMAIL PROTECTED] wrote: Hi, I thought I may have brought this up a long time ago but couldn't find anything in the archives. For a long time already I've been thinking about possibly adding a new syntax for array(...) which would be shorter. I'd suggest

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Edin Kadribasic
I like it :) +1 Edin On Feb 4, 2007, at 8:25, Andi Gutmans wrote: Hi, I thought I may have brought this up a long time ago but couldn't find anything in the archives. For a long time already I've been thinking about possibly adding a new syntax for array(...) which would be shorter. I'd

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Johannes Schlüter
Hi Andi, I'd like such a syntax enhancement. These should be the results from the last time the issue was discussed: http://devzone.zend.com/node/view/id/1474#Heading7 If I remember correct the main issues stated against it were - it's to perlish - Without keyword it's hard to find the

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Nico Haase
Hallöchen, *Johannes Schlüter* schrub: - Without keyword it's hard to find the documentation if you don't know that syntax Well, this is the same with HEREDOC since you can use any delimiter. And this new array-syntax should not replace the old one, but extend it, so everyone who wants to

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Hannes Magnusson
On 2/4/07, Nico Haase [EMAIL PROTECTED] wrote: Hallöchen, *Johannes Schlüter* schrub: - Without keyword it's hard to find the documentation if you don't know that syntax Well, this is the same with HEREDOC since you can use any delimiter. http://php.net/ -Hannes And this new

[PHP-DEV] Re: Syntactic improvement to array

2007-02-04 Thread Christian Schneider
Andi Gutmans wrote: So what I'm thinking of is: array(1, 2, 3) == [1, 2, 3] I like this syntax, more conscise but still clear (and well established in other languages by now). Two more thoughts (but please don't kill Andi's proposal because of it, rather dismiss my comments instead ;-)):

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Hannes Magnusson
Hi Andi function typeHinted([] $array = []) { // type hint array, default to empty one if(count($array)) { array_merge($array, [foo = []]); // merge $array with array(foo = array()); return $array; } return []; // empty array } typeHinted([1 = [1 = []]]); // array(1 =

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Christian Schneider
Hannes Magnusson wrote: typeHinted([1 = [1 = []]]); // array(1 = array(1 = array())); IMHO the common case would benefit and your pathological example is unreadable both ways. Personally I'd reformat it to typeHinted([ 1 = [ 1 = [] ] ]); resp.

[PHP-DEV] My Account has no right

2007-02-04 Thread mikespook
Hi all, There are some PHP-GTK-DOC files that I translated. And I want to commit them. But my account has no right to commit anything into cvs. Here is the one of the errors: Access denied: insufficient karma (mikespook|php-gtk-doc/manual/zh_cn/appendix) Contact [EMAIL PROTECTED] for

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Pierre
On 2/4/07, Hannes Magnusson [EMAIL PROTECTED] wrote: Hi Andi function typeHinted([] $array = []) { // type hint array, default to empty one That's a wrong example. Type hinting should still rely on the literal name: function typeHinted(Array $myarray=[]) --Pierre -- PHP Internals - PHP

RE: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Andi Gutmans
I would definitely not advocate to use [] in a type hint. For the same reason you don't use array() but array :) It'd be: function typeHinted(array $array = []) { ... } I don't see any issue with that. I'm talking about the construct that allows you to create an array. Andi -Original

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Lukas Kahwe Smith
Marcus Boerger wrote: Hello Andi, it is a bit harder to read and not the php way imo. I agree with Marcus. regards, Lukas -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Rasmus Lerdorf
Marcus Boerger wrote: it is a bit harder to read and not the php way imo. The PHP way is to steal and borrow from other languages whenever possible to produce a syntax that is clear and understandable to people doing web development. What is clear and understandable to web developers is a

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Zeev Suraski
My 2c - unless we also make it behave like a list() when in assignment context - I think it will confusing. So I'm +1 if we make it work as both list() and array(), and -1 otherwise. Zeev At 09:25 04-02-07, Andi Gutmans wrote: Hi, I thought I may have brought this up a long time ago but

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Ilia Alshanetsky
I have to second Marcus on this, this new syntax makes things harder to read. I mean what are you saving here, a few letter? Ilia On 4-Feb-07, at 2:25 AM, Andi Gutmans wrote: Hi, I thought I may have brought this up a long time ago but couldn't find anything in the archives. For a long

RE: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Andi Gutmans
I think it's actually more readable especially for people coming from other languages. I've always found the array() syntax not quite as readable as other languages because it allows for less structuring esp. with nesting. I actually find it harder to digest despite it being more verbose (which

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Ilia Alshanetsky
I personally find array extremely clear, in recent weeks I had to do A LOT of JavaScript work where the array syntax works in a manner you suggest for PHP and its a massive pain. It does not make for a very clear code. I think the syntax you propose is extremely confusing and we should

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Pierre
Hi, On 2/4/07, Ilia Alshanetsky [EMAIL PROTECTED] wrote: I personally find array extremely clear, in recent weeks I had to do A LOT of JavaScript work where the array syntax works in a manner you suggest for PHP and its a massive pain. It does not make for a very clear code. I think the syntax

[PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Steph
On 2/4/07, Ilia Alshanetsky [EMAIL PROTECTED] wrote: I personally find array extremely clear, in recent weeks I had to do A LOT of JavaScript work where the array syntax works in a manner you suggest for PHP and its a massive pain. It does not make for a very clear code. I think the syntax you

Re: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Lukas Kahwe Smith
Steph wrote: On 2/4/07, Ilia Alshanetsky [EMAIL PROTECTED] wrote: I personally find array extremely clear, in recent weeks I had to do A LOT of JavaScript work where the array syntax works in a manner you suggest for PHP and its a massive pain. It does not make for a very clear code. I think

RE: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Mike Robinson
Pierre wrote: On 2/4/07, Ilia Alshanetsky [EMAIL PROTECTED] wrote: I personally find array extremely clear, in recent weeks I had to do A LOT of JavaScript work where the array syntax works in a manner you suggest for PHP and its a massive pain. It does not make for a very clear

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Ilia Alshanetsky
On 4-Feb-07, at 1:14 PM, Pierre wrote: On 2/4/07, Ilia Alshanetsky [EMAIL PROTECTED] wrote: I personally find array extremely clear, in recent weeks I had to do A LOT of JavaScript work where the array syntax works in a manner you suggest for PHP and its a massive pain. It does not make for a

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Lukas Kahwe Smith
Ilia Alshanetsky wrote: On 4-Feb-07, at 1:14 PM, Pierre wrote: On 2/4/07, Ilia Alshanetsky [EMAIL PROTECTED] wrote: I personally find array extremely clear, in recent weeks I had to do A LOT of JavaScript work where the array syntax works in a manner you suggest for PHP and its a massive

Re: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Edin Kadribasic
Lukas Kahwe Smith wrote: Yes, you will come across it if its added. I find the Javascript syntax confusing to read as well. However more importantly I do not see the point in adding this sugar to save 5 chars. Nested arrays become very unreadable with the current PHP syntax. I think killing

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Pierre
On 2/4/07, Ilia Alshanetsky [EMAIL PROTECTED] wrote: On 4-Feb-07, at 1:14 PM, Pierre wrote: On 2/4/07, Ilia Alshanetsky [EMAIL PROTECTED] wrote: I personally find array extremely clear, in recent weeks I had to do A LOT of JavaScript work where the array syntax works in a manner you suggest

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Derick Rethans
On Sat, 3 Feb 2007, Andi Gutmans wrote: I thought I may have brought this up a long time ago but couldn't find anything in the archives. For a long time already I've been thinking about possibly adding a new syntax for array(...) which would be shorter. I'd suggest [...]. While I am

Re: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Derick Rethans
On Sun, 4 Feb 2007, Edin Kadribasic wrote: I don't find: $a = [1 = ['pears', 'apples'], 2 = ['juice', 'oranges']]; any less readable than: $a = array(1 = array('pears', 'apples'), 2 = array('juice', 'oranges')); Quite the opposite actually :) That's a personal thing, and I disagree.

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Marcus Boerger
Hello Pierre, as much as you are true we never accepted the argument that some simply can skip a certain syntax or feature. best regards marcus Sunday, February 4, 2007, 7:14:19 PM, you wrote: Hi, On 2/4/07, Ilia Alshanetsky [EMAIL PROTECTED] wrote: I personally find array extremely

[PHP-DEV] RFC extensions_path directive

2007-02-04 Thread Wez Furlong
We have a need for a search path for extensions, so that we can have a system provided set of extensions and an optional location for per- application extensions that either augment or override the baseline extensions. To facilitate this, I propose that we create a new directive called

Re: [PHP-DEV] RFC extensions_path directive

2007-02-04 Thread Marcus Boerger
Hello Wez, +1 marcus Sunday, February 4, 2007, 8:12:07 PM, you wrote: We have a need for a search path for extensions, so that we can have a system provided set of extensions and an optional location for per- application extensions that either augment or override the baseline

Re: [PHP-DEV] RFC extensions_path directive

2007-02-04 Thread Pierre
On 2/4/07, Wez Furlong [EMAIL PROTECTED] wrote: extensions_path = /local/extensions:$DEFAULT_EXTENSIONS_DIR +1 --Pierre -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Stanislav Malyshev
IAI personally find array extremely clear, in recent weeks I had to do A IALOT of JavaScript work where the array syntax works in a manner you IAsuggest for PHP and its a massive pain. It does not make for a very By pure coincidence, I was doing a bunch of javascript work lately too, and I

[PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Steph
Hi Stas, By pure coincidence, I was doing a bunch of javascript work lately too, and I find [] syntax OK. From readability POV it's not much difference, but much less clutter if you have really massive data array - no array() things which take half of the space. Fine, but in javascript

Re: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Stefan Walk
Steph wrote: Hi Stas, By pure coincidence, I was doing a bunch of javascript work lately too, and I find [] syntax OK. From readability POV it's not much difference, but much less clutter if you have really massive data array - no array() things which take half of the space. Fine, but in

[PHP-DEV] [SPAM] Re: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Steph
Fine, but in javascript there is only one option. That's the difference. - Steph a = Array(1,2,3) a = [1,2,3] I stand corrected. Apologies for the noise. - Steph -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Zeev Suraski
At 20:14 04-02-07, Pierre wrote: Hi, On 2/4/07, Ilia Alshanetsky [EMAIL PROTECTED] wrote: I personally find array extremely clear, in recent weeks I had to do A LOT of JavaScript work where the array syntax works in a manner you suggest for PHP and its a massive pain. It does not make for a

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Pierre
On 2/4/07, Zeev Suraski [EMAIL PROTECTED] wrote: At 20:14 04-02-07, Pierre wrote: Hi, On 2/4/07, Ilia Alshanetsky [EMAIL PROTECTED] wrote: I personally find array extremely clear, in recent weeks I had to do A LOT of JavaScript work where the array syntax works in a manner you suggest for PHP

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Zeev Suraski
At 23:27 04-02-07, Pierre wrote: On 2/4/07, Zeev Suraski [EMAIL PROTECTED] wrote: At 20:14 04-02-07, Pierre wrote: Hi, On 2/4/07, Ilia Alshanetsky [EMAIL PROTECTED] wrote: I personally find array extremely clear, in recent weeks I had to do A LOT of JavaScript work where the array syntax works

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Pierre
On 2/4/07, Zeev Suraski [EMAIL PROTECTED] wrote: One of the key guidelines of the language definition process of PHP was that we don't want multiple ways of doing the same thing, and we don't buy the argument of 'why do you care? you can still do it the other way'. We already have many ways

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Zeev Suraski
At 23:51 04-02-07, Pierre wrote: On 2/4/07, Zeev Suraski [EMAIL PROTECTED] wrote: One of the key guidelines of the language definition process of PHP was that we don't want multiple ways of doing the same thing, and we don't buy the argument of 'why do you care? you can still do it the other

Re: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Robert Cummings
On Sun, 2007-02-04 at 19:38 +0100, Edin Kadribasic wrote: Lukas Kahwe Smith wrote: Yes, you will come across it if its added. I find the Javascript syntax confusing to read as well. However more importantly I do not see the point in adding this sugar to save 5 chars. Nested arrays become

[PHP-DEV] Re: Syntactic improvement to array

2007-02-04 Thread Sara Golemon
So what I'm thinking of is: array(1, 2, 3) == [1, 2, 3] array(1, 2, array(foo, bar)) == [1, 2, [foo, bar]] array(key = 1, key2 = 2) == [key = 1, key2 = 2] An enthusiastic thumbs-sideways. I'll probably use this at some point, but not for anything which needs to be version agnostic. -Sara

[PHP-DEV] Re: RFC extensions_path directive

2007-02-04 Thread Sara Golemon
To facilitate this, I propose that we create a new directive called extensions_path that allows the sysadmin to configure a search path for extensions. I see the usage as going something like this: extensions_path = /local/extensions:$DEFAULT_EXTENSIONS_DIR Seems very useful and a good tool

[PHP-DEV] CVS Account Request: electroteque

2007-02-04 Thread Daniel Rossi
Hi there im requiring a CVS Karma account for package pear/Structures_DataGrid_Renderer_Flexy , finished proposed package is http://pear.php.net/pepr/pepr-proposal-show.php?id=418 Let me know thanks ! -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit:

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Richard Lynch
On Sun, February 4, 2007 1:25 am, Andi Gutmans wrote: I thought I may have brought this up a long time ago but couldn't find anything in the archives. For a long time already I've been thinking about possibly adding a new syntax for array(...) which would be shorter. I'd suggest [...]. While

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Richard Lynch
On Sun, February 4, 2007 10:59 am, Zeev Suraski wrote: My 2c - unless we also make it behave like a list() when in assignment context - I think it will confusing. So I'm +1 if we make it work as both list() and array(), and -1 otherwise. Can you show by example what this means? I'm seeing

[PHP-DEV] zend_parse_parameters 's!' for NULL string ok?

2007-02-04 Thread Michael B Allen
The documentation claims: The following characters also have a meaning in the specifier string: ! - the parameter it follows can be of specified type or NULL (only applies to a, o, O, r, and z). If NULL value is passed by the user, the storage pointer will be set to NULL. Does the '!'

Re: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Richard Lynch
On Sun, February 4, 2007 2:46 pm, Stefan Walk wrote: Steph wrote: Hi Stas, By pure coincidence, I was doing a bunch of javascript work lately too, and I find [] syntax OK. From readability POV it's not much difference, but much less clutter if you have really massive data array - no array()

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Richard Lynch
On Sun, February 4, 2007 8:58 am, Christian Schneider wrote: Plus you could still use array() if you really wanted to. Yes, but sooner or later I am stuck with somebody else's code who decided to write the non-array version, and I'm sitting there wondering what [bleep] this code is doing.

Re: [PHP-DEV] Re: Syntactic improvement to array

2007-02-04 Thread Richard Lynch
On Sun, February 4, 2007 8:23 am, Christian Schneider wrote: Andi Gutmans wrote: So what I'm thinking of is: array(1, 2, 3) == [1, 2, 3] I like this syntax, more conscise but still clear (and well established in other languages by now). Two more thoughts (but please don't kill Andi's

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Richard Lynch
On Sun, February 4, 2007 7:53 am, Hannes Magnusson wrote: On 2/4/07, Nico Haase [EMAIL PROTECTED] wrote: Hallöchen, *Johannes Schlüter* schrub: - Without keyword it's hard to find the documentation if you don't know that syntax Well, this is the same with HEREDOC since you can use

[PHP-DEV] Re: Syntactic improvement to array

2007-02-04 Thread Gregory Beaver
Andi Gutmans wrote: Hi, I thought I may have brought this up a long time ago but couldn't find anything in the archives. For a long time already I've been thinking about possibly adding a new syntax for array(...) which would be shorter. I'd suggest [...]. While I am usually not in favor

[PHP-DEV] Object[] type hint

2007-02-04 Thread Sebastian Bergmann
Hi, any chance for the following type hint syntax class Example { public function doSomething(Object[] $objects) { } } instead of having to write class Example { public function doSomething(Array $objects) { foreach ($objects as

Re: [PHP-DEV] Re: RFC extensions_path directive

2007-02-04 Thread Brian Moon
+1 and a +1 on Sara's comment. Especially if we are talking about PHP6. I could see an argument for 5.x not getting this in extension_dir. But, I still think sticking with one setting is better. Sara Golemon wrote: To facilitate this, I propose that we create a new directive called

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Brian Moon
phpxcache wrote: most ppl who works on web pages have to know what javascript is, so there isn't any difficulty for ppl to get used ... You give brand new PHP hackers too much credit. Sure professional PHP developers do have to work with Javascript. But, working on Phorum and see real

Re: [PHP-DEV] Syntactic improvement to array

2007-02-04 Thread Antony Dovgal
On 02/04/2007 10:25 AM, Andi Gutmans wrote: Hi, I thought I may have brought this up a long time ago but couldn't find anything in the archives. For a long time already I've been thinking about possibly adding a new syntax for array(...) which would be shorter. I'd suggest [...]. While I am