-Original Message-
From: Robert Cummings [mailto:[EMAIL PROTECTED]
Sent: 06 February 2007 16:09
I know how much you want to feel special, but here's the
definition of read. Your description of how you interpret
what you see falls into this definition:
Oh, no fair! You've
-Original Message-
From: Richard Lynch [mailto:[EMAIL PROTECTED]
Sent: 07 February 2007 02:34
I was specifically thinking of the sheer number of emails to
PHP-General that would result.
Even if 90% of the newbies get it without any research, and
5% more figure it out from
On 05 February 2007 17:29, Brian Moon wrote:
Ford, Mike 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
On Tue, 2007-02-06 at 14:08 +, Ford, Mike wrote:
On 05 February 2007 17:29, Brian Moon wrote:
That is why you have coding standards. Our doucment states that this
should be written as:
$a = array(
1 = array('pears', 'apples'),
2 = array('juice', 'oranges')
);
I
On Tue, Feb 06, 2007 at 09:41:34AM -0500, Robert Cummings wrote:
On Tue, 2007-02-06 at 14:08 +, Ford, Mike wrote:
On 05 February 2007 17:29, Brian Moon wrote:
That is why you have coding standards. Our doucment states that this
should be written as:
$a = array(
1 =
Alain Williams wrote:
Anyway: it makes php look like perl -- and that would never do :-)
Can we please stop that FUD? (even if it is meant as a joke)
... if at all then you might say it looks like Javascript, Python or
Ruby. Perl uses an ugly mix of () and [] to emulate multi-dimensional
arrays
On Tue, Feb 06, 2007 at 04:16:28PM +0100, Christian Schneider wrote:
Alain Williams wrote:
Anyway: it makes php look like perl -- and that would never do :-)
Can we please stop that FUD? (even if it is meant as a joke)
No: it was NOT a serious point. What is wrong with the occasional grin ?
how it is different? How explaining array written as [] so much harder
that explaining array written as ()? What exactly constitutes the
problem?
Here's the difference:
You can Google for 'array' and learn a lot.
If you try to Google for [] you don't learn squat.
Try it and see.
So our
Hi.
Our 'newbie' at least has a good chance of figuring out
$a = [1,2,3] vs.$a = array(1,2,3)
is different than
$a = foobar(1,2,3)
I am probably out of my depth here...but I actually find the argument
about wether to introduce this syntax or not, very
On 06 February 2007 14:42, Robert Cummings wrote:
On Tue, 2007-02-06 at 14:08 +, Ford, Mike wrote:
On 05 February 2007 17:29, Brian Moon wrote:
That is why you have coding standards. Our doucment states that
this should be written as:
$a = array(
1 = array('pears',
On Feb 5, 2007, at 3:37 PM, Richard Lynch wrote:
Yes, and it makes life miserable for some of us...
Is that a good reason to extend that misery to yet another operator?
Richard, please. This is not advanced OO stuff or anything close.
It's an operator. Give PHP users (even newbies) some
On Tue, 2007-02-06 at 15:41 +, Ford, Mike wrote:
On 06 February 2007 14:42, Robert Cummings wrote:
On Tue, 2007-02-06 at 14:08 +, Ford, Mike wrote:
On 05 February 2007 17:29, Brian Moon wrote:
That is why you have coding standards. Our doucment states that
this should be
On Tue, February 6, 2007 11:26 am, Andrei Zmievski wrote:
On Feb 5, 2007, at 3:37 PM, Richard Lynch wrote:
Yes, and it makes life miserable for some of us...
Is that a good reason to extend that misery to yet another operator?
Richard, please. This is not advanced OO stuff or anything
On 04 February 2007 07: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 suggest
[...]. While
On 04 February 2007 18:38, 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
On 04 February 2007 21:41, Zeev Suraski wrote:
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
I agree. Syntax is good, if we make it work both ways.
-Andrei
On Feb 4, 2007, at 8: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
you, they don't have a clue what they are doing. $a = [1,2,3]; would
not mean jack sqat to those folks. And as stated, finding docs on that
How hard can that be? If one is smart enough to do computer programming,
how hard can it be to know $a=[1,2,3] is an array? Like, what else could
it
Stanislav Malyshev wrote:
you, they don't have a clue what they are doing. $a = [1,2,3]; would
not mean jack sqat to those folks. And as stated, finding docs on that
How hard can that be? If one is smart enough to do computer programming,
how hard can it be to know $a=[1,2,3] is an array?
When a new PHP user asks you What is an array? you will understand.
If someone is not familiar with the concept of the array at all, it
doesn't matter if it's written as array(1,2,3) or [1,2,3]. That's not
what we are discussing right now.
Its clear that not all the folks on internals
If someone is not familiar with the concept of the array at all, it
doesn't matter if it's written as array(1,2,3) or [1,2,3]. That's not
what we are discussing right now.
My point is that if its written array(1,2,3) that have something to
search for in the docs. The new proposed syntax
I don't buy the searching docs is easier argument. There are plenty
of operators and such that are hard to search for.
-Andrei
On Feb 5, 2007, at 11:07 AM, Brian Moon wrote:
If someone is not familiar with the concept of the array at all, it
doesn't matter if it's written as array(1,2,3) or
Andrei Zmievski wrote:
I don't buy the searching docs is easier argument. There are plenty of
operators and such that are hard to search for.
Good point, but, were there pre-existing solutions to those operators
when they were created? I think that is the point that Zeev was making.
We
On Mon, 2007-02-05 at 10:01 -0800, Stanislav Malyshev wrote:
you, they don't have a clue what they are doing. $a = [1,2,3]; would
not mean jack sqat to those folks. And as stated, finding docs on that
How hard can that be? If one is smart enough to do computer programming,
how hard
$a = array( 1, 2, 3 ).
It's not hard. I don't think anybody ever argued it's hard to
understand. The argument was it's too verbose once you talk about
multi-dimensional arrays with a lot of sub-arrays containing in turn
even more sub-arrays - entire code becomes packed with
On Mon, February 5, 2007 12:01 pm, Stanislav Malyshev wrote:
you, they don't have a clue what they are doing. $a = [1,2,3];
would
not mean jack sqat to those folks. And as stated, finding docs on
that
How hard can that be? If one is smart enough to do computer
programming,
how hard can
On Mon, February 5, 2007 12:24 pm, Stanislav Malyshev wrote:
When a new PHP user asks you What is an array? you will
understand.
If someone is not familiar with the concept of the array at all, it
doesn't matter if it's written as array(1,2,3) or [1,2,3]. That's not
what we are
Put it this way: Are you willing to answer EVERY PHP-General question
asking what this is? ;-)
Cuz I'm sure not willing to do it.
I'm not willing to answer newbie questions on regular basis, but that
has nothing to do with anything - I was unwilling to do it with any
syntax. I just think
On Mon, February 5, 2007 1:18 pm, Andrei Zmievski wrote:
I don't buy the searching docs is easier argument. There are plenty
of operators and such that are hard to search for.
Yes, and it makes life miserable for some of us...
Is that a good reason to extend that misery to yet another
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
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
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
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
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
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
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
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 =
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.
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
Message-
From: Hannes Magnusson [mailto:[EMAIL PROTECTED]
Sent: Sunday, February 04, 2007 6:30 AM
To: Andi Gutmans
Cc: internals@lists.php.net
Subject: Re: [PHP-DEV] Syntactic improvement to array
Hi Andi
function typeHinted([] $array = []) { // type hint array,
default to empty one
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
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
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
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
PROTECTED]
Sent: Sunday, February 04, 2007 9:28 AM
To: Andi Gutmans
Cc: internals@lists.php.net
Subject: Re: [PHP-DEV] Syntactic improvement to array
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
.
Andi
-Original Message-
From: Ilia Alshanetsky [mailto:[EMAIL PROTECTED]
Sent: Sunday, February 04, 2007 9:28 AM
To: Andi Gutmans
Cc: internals@lists.php.net
Subject: Re: [PHP-DEV] Syntactic improvement to array
I have to second Marcus on this, this new syntax makes things
harder
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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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()
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.
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
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
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
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 of having more than one
75 matches
Mail list logo