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 us
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 use
+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
extensio
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 $o
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
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 si
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 A
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.
T
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
>>> ar
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 '!' c
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 seei
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
> [...]. Wh
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: http://www.php
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
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 a
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 array
On 2/4/07, Zeev Suraski <[EMAIL PROTECTED]> wrote:
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 ar
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 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: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 sy
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
>>sugge
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 v
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
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.
>
> F
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 there
IA>>I personally find array extremely clear, in recent weeks I had to do A
IA>>LOT of JavaScript work where the array syntax works in a manner you
IA>>suggest 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
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
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
> ext
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
ext
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
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
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 usu
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
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
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 pai
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
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
> >
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 t
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
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 stick
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
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 stic
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 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 t
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 coul
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 mov
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
Yep. I should have finished reading my messages first :)
> -Original Message-
> From: Pierre [mailto:[EMAIL PROTECTED]
> Sent: Sunday, February 04, 2007 7:24 AM
> To: Hannes Magnusson
> Cc: Andi Gutmans; internals@lists.php.net
> Subject: Re: [PHP-DEV] Syntactic improvement to array
>
>
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 Mes
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 R
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 a
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.
typeHint
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(
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 ;-)):
-
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 ar
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
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 documen
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 sug
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 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 "ph
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
61 matches
Mail list logo