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
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 ;-)):
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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:
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
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 '!'
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 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
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
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
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
+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
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
58 matches
Mail list logo