On Thu, 2003-11-06 at 13:04, Andi Gutmans wrote:
> At 09:58 AM 11/6/2003 +0100, Stig S. Bakken wrote:
> >Let's sum up the pros and cons:
> >
> >Pros: sexiness?
> >
> >Cons: another BC issue, syntax obfuscation, potential grammar conflicts
>
> Just to be more accurate there are no BC issues and as
On Thu, 6 Nov 2003, Andi Gutmans wrote:
> Sascha,
>
> I don't think it's a private matter.
If there was anything constructive in that long thread of "I
like it" -- "no, I don't!" I might agree with you, but given
the current contents, the noise exceeds the useful debate by
far.
Sascha,
I don't think it's a private matter. Feel free to delete the emails with
this subject when they come in.
Andi
At 01:30 PM 11/6/2003 +0100, Sascha Schumann wrote:
Please move this thread to private email.
- Sascha
--
PHP Internals - PHP Runtime Development Mailing List
To unsub
Please move this thread to private email.
- Sascha
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
On 05 November 2003 18:39, Andrei Zmievski wrote:
> On Wed, 05 Nov 2003, Ford, Mike [LSS] wrote:
> >
> > I don't think the number of characters is the main issue here --
> > it's about having a *nicer* set of characters. Personally, I'd be
> > still be in favour (although not quite
On 05 November 2003 17:19, Marco Tabini wrote:
> Ford, Mike [LSS] wrote:
> > On 05 November 2003 17:06, Marco Tabini contributed these pearls of
> > wisdom:
> >
> >
> > > Christian Schneider wrote:
> > >
> > > > Marco Tabini wrote:
> > > >
> > > >
> > > > > $a = [[1,2,3],[1=>[1,3,2,2], "a"=>
Mike Robinson wrote:
Perlish or not could not be a real reason for adding or not
adding a feature in PHP. The important thing here is if it
fits to the language concept or not.
Indeed, and IMHO it does, much like
($a==$b)?...
fits in quite well as an alternative to
if ($a==$b)...
It is an a
At 09:58 AM 11/6/2003 +0100, Stig S. Bakken wrote:
Let's sum up the pros and cons:
Pros: sexiness?
Cons: another BC issue, syntax obfuscation, potential grammar conflicts
Just to be more accurate there are no BC issues and as far as I know, there
aren't any grammar conflicts.
Andi
--
PHP Inter
Kouber Saparev wrote:
> Perlish or not could not be a real reason for adding or not
> adding a feature in PHP. The important thing here is if it
> fits to the language concept or not.
Indeed, and IMHO it does, much like
($a==$b)?...
fits in quite well as an alternative to
if ($a==$b)...
It i
Perlish or not could not be a real reason for adding or not adding a feature
in PHP. The important thing here is if it fits to the language concept or
not.
Kouber
"Sara Golemon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> FWIW- (And I understand I'm late chiming in on this threa
On Wed, 2003-11-05 at 17:48, Andi Gutmans wrote:
> At 11:48 AM 11/5/2003 -0500, Ilia Alshanetsky wrote:
> >On November 5, 2003 11:21 am, you wrote:
> > > Well, like I said before, I am not sure this is a clear case of that. I'm
> > > probably the biggest defender around of the no-magic rule, but [
At 02:07 AM 11/6/2003 +0100, Christian Schneider wrote:
George Schlossnagle wrote:
George (thinking [] is pretty but disliking alternative syntaxes)
Ok, let me recap my short visit on this mailing list:
1) Dangling commas in function calls were considered bloat
No, not bloat. I was worried that the
Ard Biesheuvel wrote:
spell out your array definitions. The decision has been made a long time
ago to use the array() syntax. Adding alternatives adds nothing but the
I was under the impression that syntax changes are possible. Silly me.
Try/catch however are a fundamental extension to the funct
After all this I guess I have to maintain my own PHP branch and hope for
PHP6 to address some of my issues. Or switch to another language at some
point, because a language to me is a tool, not a religion.
This is exactly the point. Why waste so much energy on deciding how to
spell out your array
George Schlossnagle wrote:
George (thinking [] is pretty but disliking alternative syntaxes)
Ok, let me recap my short visit on this mailing list:
1) Dangling commas in function calls were considered bloat
2) Adding the local vars to debug_backtrace() was silently ignored
3) A prettier array syntax
> Anyway, it's no biggy and if most people here think it shouldn't be added
> then that's fine with me.
Thies reminded me of something that should be considered here; we talked
about
and alternative array syntax for overloaded objects where all the array
indices are
required in one "chunk" to be a
On Nov 5, 2003, at 5:41 PM, Sara Golemon wrote:
FWIW- (And I understand I'm late chiming in on this thread)
I'm -1 on this syntax.
It's Perlish and ugly. It is *not* PHP syntax.
To continue to play devils advocate, I actually find it C-ish and nice:
char foo[] = { "a", "b", "c i told you so"
FWIW- (And I understand I'm late chiming in on this thread)
I'm -1 on this syntax.
It's Perlish and ugly. It is *not* PHP syntax.
-Sara
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
right. :-)
--David
> -Original Message-
> From: Robert Cummings [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 05, 2003 3:09 PM
> To: David Enderson
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP-DEV] Proposal: Array syntax
>
>
> On Wed, 2003-11-05 at 14:0
On Wed, 2003-11-05 at 14:03, David Enderson wrote:
>
> I believe the ultimate goal of PHP is to have a "quick and dirty"
> language that is easy to read, use, and learn. While Rasmus's comment
I complete disagree with the "quick and dirty" statement. Maybe at one
time, but I think a lot of effor
Rasmus Lerdorf wrote:
On Wed, 5 Nov 2003, Christian Schneider wrote:
Ok, a quick head count gave 9 people pro, 6 people con and 3 people I
couldn't figure out if they are pro or con (-:C
In case it wasn't clear, I am a -0 on this. I don't mind the syntax, but
having two different syntaxes is
Marco Tabini wrote:
George Schlossnagle wrote:
On Nov 5, 2003, at 1:29 PM, Marco Tabini wrote:
$a = [1,2,$b[11]] is semantically inconsistent.
How so? Is
I think I've already explained why.
Not really understandable, though.
foo(array(1,2));
semantically inconsistent? On one hand () is us
+1 for the [] syntax. I also feel it's much more intuitive. Calling
(what looks like) a function to make an array seems plain silly to me.
Shane
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
George Schlossnagle wrote:
On Nov 5, 2003, at 1:29 PM, Marco Tabini wrote:
$a = [1,2,$b[11]] is semantically inconsistent.
How so? Is
I think I've already explained why.
foo(array(1,2));
semantically inconsistent? On one hand () is used with a language
construct (array()), whereas in the o
I have read all the debate on this and found it very interesting. You
guys were generating comments faster than I could read them! lol.
I have used PHP constantly for 2 years. Most of that time has been
spent using arrays very extensively and often as function parameters.
For what my vote is wo
On Nov 5, 2003, at 1:29 PM, Marco Tabini wrote:
$a = [1,2,$b[11]] is semantically inconsistent.
How so? Is
foo(array(1,2));
semantically inconsistent? On one hand () is used with a language
construct (array()), whereas in the other context it indicates
arguments to a function. I think that i
On Wed, 05 Nov 2003, Ford, Mike [LSS] wrote:
> On 05 November 2003 16:48, Ilia Alshanetsky contributed these pearls of
> wisdom:
>
> > I mean c'mon, is 5 characters that much of a problem and is
> > absolute code clarity not worth those 5 characters? Character
> > efficiency is done
On Nov 5, 2003, at 12:54 PM, Jani Taskinen wrote:
On Wed, 5 Nov 2003, Andi Gutmans wrote:
At 11:58 AM 11/5/2003 -0500, George Schlossnagle wrote:
is that any less clear than
$a = array(array(1,2,3), array(1 => array(1,3,2,2), array("a" =>
array(array(1,2,3,4), 4, array(1,2)));
Both examples can
I guess we'll have to agree to disagree
$a = [1,2,$b[11]] is semantically inconsistent.
Yeah, I agree to disagree on that one, too :)
Actually, do you realize that you use () both for "grouping" and for
application? I can't see anything wrong with using square brackets for
array element access
I like some of the Python syntax. But some of it is cumbersome. Same
with PHP. But I think PHP is closer to what I want so what's wrong with
trying to improve it where it's possible (and easily done)?
agree, and you can easily make PHP code not readable with such improvements.
again, I can't un
Michael Walter wrote:
$a = [1,2,$b[11]];
Is that confusing enough for you? ;-)
What's confusing about it?
The fact that $b[11] references an item of an array, while
[1,2,$b[11]] assigns values to the array $a. The fact that you (and,
probably, most of us) can't tell right off the bat is a c
Jaap van Ganswijk wrote:
At 2003-11-05 09:59 +0100, Michael Walter wrote:
Very cool.
How about supporting .. syntax, btw. as in [1..3] or ["a".."z"]? Might no be the worth, just thinking out loud ;)
I'm also in favor of a shorter notation for array() and list().
In fact this also helps t
Alle 18:48, mercoledì 5 novembre 2003, Romans Malinovskis ha scritto:
> > The devs are mostly at the conference now. I think it is easy to
> > discuss. I won't be surprised if cons after that are more than
> > pros.
>
> I think end-user / newbie votes should be rather considered than
> dev's since
$a = [1,2,$b[11]];
Is that confusing enough for you? ;-)
What's confusing about it?
The fact that $b[11] references an item of an array, while [1,2,$b[11]]
assigns values to the array $a. The fact that you (and, probably, most
of us) can't tell right off the bat is a clear sign that this is a
At 2003-11-05 09:59 +0100, Michael Walter wrote:
>Very cool.
>
>How about supporting .. syntax, btw. as in [1..3] or ["a".."z"]? Might no be the
>worth, just thinking out loud ;)
I'm also in favor of a shorter notation for array() and list().
In fact this also helps to ease the problem I have
wi
On Wed, 5 Nov 2003, Andi Gutmans wrote:
>At 11:58 AM 11/5/2003 -0500, George Schlossnagle wrote:
>
>>On Nov 5, 2003, at 11:52 AM, Marco Tabini wrote:
>>>But isn't there a big difference between an assignment and a reference?
>>>I, for one, think that language constructs should be as univocal as
>
> The devs are mostly at the conference now. I think it is easy to discuss.
> I won't be surprised if cons after that are more than pros.
I think end-user / newbie votes should be rather considered than dev's since
they are ones who will be learning and getting used to this syntax. So why
don't pl
Rasmus Lerdorf <[EMAIL PROTECTED]> wrote:
> I do agree that [1,2,3] is not easier to read than array(1,2,3), but I
> don't think there is a huge difference between the two. I guess we could
> sample a few newbie users to see what they think $a = [1,2,3]; would do.
> Of course, then people are g
On Wednesday, Nov 5, 2003, at 17:48 Europe/Copenhagen, Andi Gutmans
wrote:
Anyway, it's no biggy and if most people here think it shouldn't be
added then that's fine with me.
I like the new syntax proposal, especially when passing arrays as
function parameters.
+1 here.
Edin
--
PHP Internals
On Wed, 5 Nov 2003, Christian Schneider wrote:
> Andi Gutmans wrote:
> > I don't believe in saving characters.
>
> Agreed, it's not about saving characters (only).
>
> > Anyway, it's no biggy and if most people here think it shouldn't be
> > added then that's fine with me.
>
> Ok, a quick hea
On Wed, 5 Nov 2003, Christian Schneider wrote:
Andi Gutmans wrote:
> I don't believe in saving characters.
Agreed, it's not about saving characters (only).
> Anyway, it's no biggy and if most people here think it shouldn't be
> added then that's fine with me.
Ok, a quick head count gav
On Nov 5, 2003, at 12:33 PM, Derick Rethans wrote:
On Wed, 5 Nov 2003, Christian Schneider wrote:
Andi Gutmans wrote:
I don't believe in saving characters.
Agreed, it's not about saving characters (only).
Anyway, it's no biggy and if most people here think it shouldn't be
added then that's fine
On Wed, 5 Nov 2003, Christian Schneider wrote:
> Andi Gutmans wrote:
> > I don't believe in saving characters.
>
> Agreed, it's not about saving characters (only).
>
> > Anyway, it's no biggy and if most people here think it shouldn't be
> > added then that's fine with me.
>
> Ok, a quick hea
Romans Malinovskis wrote:
Think backwards.. Will you be able to convince
any perl/python/javascript developer to use
array(), list(), range() structs?
I really don't think this needs to be a concern. You can't be everything
to all people.
Mt.
r
$a = [1,2,$b[11]];
Is that confusing enough for
Think backwards.. Will you be able to convince
any perl/python/javascript developer to use
array(), list(), range() structs?
r
> $a = [1,2,$b[11]];
>
> Is that confusing enough for you? ;-)
>
>
> Mt.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.
At 11:58 AM 11/5/2003 -0500, George Schlossnagle wrote:
On Nov 5, 2003, at 11:52 AM, Marco Tabini wrote:
But isn't there a big difference between an assignment and a reference?
I, for one, think that language constructs should be as univocal as
possible in order to minimize confusion, lest we end
do things isn't always
a good thing.
Add me to the -1 list. Even tho' it's a cool idea.
- Steph
> -Original Message-
> From: Christian Schneider [mailto:[EMAIL PROTECTED]
> Sent: 04 November 2003 23:33
> To: [EMAIL PROTECTED]
> Subject: [PHP-DEV] Proposal
On November 5, 2003 12:01 pm, Ford, Mike [LSS] wrote:
> I don't think the number of characters is the main issue here -- it's about
> having a *nicer* set of characters. Personally, I'd be still be in favour
> (although not quite as much) if the proposed syntax were [[[1,2,3]]] -- for
> me, it's a
Ford, Mike [LSS] wrote:
On 05 November 2003 17:06, Marco Tabini contributed these pearls of wisdom:
Christian Schneider wrote:
Marco Tabini wrote:
$a = [[1,2,3],[1=>[1,3,2,2], "a"=>[[1,2,3,4],4,[1,2]]];
$a = array(array(1,2,3),array(1=>array(1,3,2,2),
"a"=>array(array(1,2,3,4),4,array(1,2)))
On 05 November 2003 16:52, Marco Tabini contributed these pearls of wisdom:
>
> $a = [[1,2,3],[1=>[1,3,2,2], "a"=>[[1,2,3,4],4,[1,2]]];
>
> I don't know about you, but I can't even begin to count the
> brackets in there... :-)
At quick glance says it looks unbalanced. A count shows why: 7 [s a
On 05 November 2003 17:06, Marco Tabini contributed these pearls of wisdom:
> Christian Schneider wrote:
>> Marco Tabini wrote:
>>
>>> $a = [[1,2,3],[1=>[1,3,2,2], "a"=>[[1,2,3,4],4,[1,2]]];
>>
>>
>> $a = array(array(1,2,3),array(1=>array(1,3,2,2),
>> "a"=>array(array(1,2,3,4),4,array(1,2)));
>
On 05 November 2003 16:48, Ilia Alshanetsky contributed these pearls of
wisdom:
> I mean c'mon, is 5 characters that much of a problem and is
> absolute code clarity not worth those 5 characters? Character
> efficiency is done in Perl, where you can do things like ~=
> and @_, but that makes Perl
Christian Schneider wrote:
Marco Tabini wrote:
$a = [[1,2,3],[1=>[1,3,2,2], "a"=>[[1,2,3,4],4,[1,2]]];
$a = array(array(1,2,3),array(1=>array(1,3,2,2),
"a"=>array(array(1,2,3,4),4,array(1,2)));
Besides my previous points, something even more abominable:
$a = [1,2,$b[11]];
Is that confusing e
George Schlossnagle wrote:
On Nov 5, 2003, at 11:52 AM, Marco Tabini wrote:
But isn't there a big difference between an assignment and a reference?
I, for one, think that language constructs should be as univocal as
possible in order to minimize confusion, lest we end up having to read
something
Marco Tabini wrote:
$a = [[1,2,3],[1=>[1,3,2,2], "a"=>[[1,2,3,4],4,[1,2]]];
$a = array(array(1,2,3),array(1=>array(1,3,2,2),
"a"=>array(array(1,2,3,4),4,array(1,2)));
What was your point again? ;-)
- Chris
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www
On Wed, 5 Nov 2003, Christian Schneider wrote:
>Andi Gutmans wrote:
> > I don't believe in saving characters.
>
>Agreed, it's not about saving characters (only).
>
>> Anyway, it's no biggy and if most people here think it shouldn't be
>> added then that's fine with me.
>
>Ok, a quick head count g
On Nov 5, 2003, at 11:52 AM, Marco Tabini wrote:
But isn't there a big difference between an assignment and a reference?
I, for one, think that language constructs should be as univocal as
possible in order to minimize confusion, lest we end up having to read
something like:
$a = [[1,2,3],[1=>[1
Andi Gutmans wrote:
> I don't believe in saving characters.
Agreed, it's not about saving characters (only).
Anyway, it's no biggy and if most people here think it shouldn't be
added then that's fine with me.
Ok, a quick head count gave 9 people pro, 6 people con and 3 people I
couldn't figure o
Rasmus Lerdorf wrote:
On Wed, 5 Nov 2003, Ilia Alshanetsky wrote:
On November 5, 2003 10:34 am, Christian Schneider wrote:
PHP is a mix of C, Perl and other styles anyway, why deny it? It's
strength is that it's a pragmatic and simple language but that doesn't
mean that nothing should be changed
On 05 November 2003 15:57, Ilia Alshanetsky contributed these pearls of
wisdom:
> On November 5, 2003 10:34 am, Christian Schneider wrote:
>> PHP is a mix of C, Perl and other styles anyway, why deny it?
>> It's strength is that it's a pragmatic and simple language
>> but that doesn't mean that no
On Wed, 5 Nov 2003, Ilia Alshanetsky wrote:
>I do not like the new syntax at all. If anything it seems rather unnatural and
>what do you save, typing of 5 characters that makes it clear that this is an
>array to even the most novice of users? It certainly not going to make the
>code any faster
At 11:48 AM 11/5/2003 -0500, Ilia Alshanetsky wrote:
On November 5, 2003 11:21 am, you wrote:
> Well, like I said before, I am not sure this is a clear case of that. I'm
> probably the biggest defender around of the no-magic rule, but [] does
> imply something array-related to most people, so I th
On November 5, 2003 11:21 am, you wrote:
> Well, like I said before, I am not sure this is a clear case of that. I'm
> probably the biggest defender around of the no-magic rule, but [] does
> imply something array-related to most people, so I think the magic part is
> much smaller than in other pr
Antony Dovgal wrote:
do you agree, that $a[] = ''; and $a = []; look almost similar for newbies?
And they both deal with arrays. That's not confusing to me.
Why have $a[] = ''; then in the first place? You already have
array_push($a, ''). Or do you seriously think $a[] = ''; shouldn't be there?
P
On Wed, 5 Nov 2003, Ilia Alshanetsky wrote:
> On November 5, 2003 10:34 am, Christian Schneider wrote:
> > PHP is a mix of C, Perl and other styles anyway, why deny it? It's
> > strength is that it's a pragmatic and simple language but that doesn't
> > mean that nothing should be changed ever.
>
>
On Wed, 05 Nov 2003 16:34:52 +0100
Christian Schneider <[EMAIL PROTECTED]> wrote:
> I'm just trying to improve PHP. And I write _a lot_ of PHP code, so I
> have some idea about where the syntax could be improved IMHO.
changing the syntax is not the best way imho.
> PHP is a mix of C, Perl and
On November 5, 2003 10:34 am, Christian Schneider wrote:
> PHP is a mix of C, Perl and other styles anyway, why deny it? It's
> strength is that it's a pragmatic and simple language but that doesn't
> mean that nothing should be changed ever.
PHP strength (IMHO) is it's simple and clear syntax, wh
Christian Schneider [mailto:[EMAIL PROTECTED]
Envoye : mercredi 5 novembre 2003 16:35
A : Antony Dovgal
Cc : [EMAIL PROTECTED]
Objet : Re: [PHP-DEV] Proposal: Array syntax
Ok, I tried to just listen to what people are saying but this comment
went too far ;-)
Antony Dovgal wrote:
> No, it looks lik
Ok, I tried to just listen to what people are saying but this comment
went too far ;-)
Antony Dovgal wrote:
No, it looks like someone trying to turn PHP into Perl (or Python).
I'm just trying to improve PHP. And I write _a lot_ of PHP code, so I
have some idea about where the syntax could be imp
On Wed, 5 Nov 2003, Ilia Alshanetsky wrote:
> I do not like the new syntax at all. If anything it seems rather unnatural and
> what do you save, typing of 5 characters that makes it clear that this is an
> array to even the most novice of users? It certainly not going to make the
> code any fas
On Wed, 5 Nov 2003 08:06:53 -0500
Ilia Alshanetsky <[EMAIL PROTECTED]> wrote:
> I do not like the new syntax at all. If anything it seems rather unnatural and >
> what do you save, typing of 5 characters that makes it clear that this is an
> array to even the most novice of users? It certainly n
Hi Andi, Christian--
From a logical standpoint, I think this could be very confusing. To me,
for one, square brackets imply reference, not assignment. Taking
something that means "take something out of the array" and now using it
to mean "put something in the array" makes the language a bit les
I do not like the new syntax at all. If anything it seems rather unnatural and
what do you save, typing of 5 characters that makes it clear that this is an
array to even the most novice of users? It certainly not going to make the
code any faster and if anything will only add confusion.
Firm -1
On Wed, 05 Nov 2003 19:34:52 +0700
Alexey Trunyov <[EMAIL PROTECTED]> wrote:
> Andi Gutmans wrote:
>
> > Personally I don't like having two ways of doing things. It makes it
> > harder for people to read scripts.
>
> It looks like the one way of doing two separate things.
No, it looks like som
Andi Gutmans wrote:
Personally I don't like having two ways of doing things. It makes it
harder for people to read scripts.
It looks like the one way of doing two separate things.
I mean that semanics of two usages of square brackets as operator is
inverse depending on whether it is used in unar
On Wednesday 05 November 2003 09:49, Andi Gutmans wrote:
> However, I think the proposed syntax is significantly more elegant than
> today's array() which makes me think twice about the idea and possibly
> making an exception to the rule. I think it'll improve the look of PHP
> scripts. Also I thin
I like it a lot as well. Having the [] syntax also support range()-like
calls would be a very nice idea as well. :D
Regards,
Manuzhai
"Mike Robinson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> s0niX wrote:
>
> > The problem i see when using array() (or list()) is that it nearl
s0niX wrote:
> The problem i see when using array() (or list()) is that it nearly looks
> like it is a function, but it isn't. Using [] instead would clearly
> mark this difference.
> array() and list() are special language constructs, why shouldn't
> they look a bit special?
> This doesn't break
On 05 November 2003 08:50, Andi Gutmans contributed these pearls of wisdom:
> At 12:33 AM 11/5/2003 +0100, Christian Schneider wrote:
>> I propose to add an alternative (backward compatible) short
>> array creation syntax: $a = [ 1, 2, 3 ]; and $a = [ 'a' =>
>> 42, 'b' => "foo" ];
>
> Personall
Hi
The problem i see when using array() (or list()) is that it nearly looks
like it is a function, but it isn't. Using [] instead would clearly
mark this difference.
array() and list() are special language constructs, why shouldn't they look a bit
special?
This doesn't break backwards compatibili
Andi Gutmans wrote:
I guess I think it'd be interesting to see what other's think. Also,
another point to check is if list() can also be converted into []
because having a hybrid wouldn't be too nice.
Having list() work the same way would be very sexy indeed:
[$a, $b] = [$b, $a];
To be honest I n
Your idea is even cooler...;)
I would like to have these in PHP.
Kouber
"Michael Walter" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Very cool.
>
> How about supporting .. syntax, btw. as in [1..3] or ["a".."z"]? Might
> no be the worth, just thinking out loud ;)
>
> Christian
Very cool.
How about supporting .. syntax, btw. as in [1..3] or ["a".."z"]? Might
no be the worth, just thinking out loud ;)
"might not be worth it"..
Christian Schneider wrote:
I propose to add an alternative (backward compatible) short array
creation syntax:
$a = [ 1, 2, 3 ]; and $a = [ 'a' =
Very cool.
How about supporting .. syntax, btw. as in [1..3] or ["a".."z"]? Might
no be the worth, just thinking out loud ;)
Christian Schneider wrote:
I propose to add an alternative (backward compatible) short array
creation syntax:
$a = [ 1, 2, 3 ]; and $a = [ 'a' => 42, 'b' => "foo" ];
It
Hi Christian,
Personally I don't like having two ways of doing things. It makes it harder
for people to read scripts.
However, I think the proposed syntax is significantly more elegant than
today's array() which makes me think twice about the idea and possibly
making an exception to the rule. I
More magic. The difference between these two lines:
$a = array(1,2,3);
$a = [ 1,2,3 ];
is that with the first you can go and look up the array keyword and see
what it does, whereas on the second line you have no idea. You can't look
up a [
You are right that arrays are common and that this m
Christian Schneider wrote:
Note: I checked the newsgroup archive but couldn't find a discussion
about this. After not hearing back about my proposed enhancement to
debug_backtrace() and the dangling comma for function call parameters
being rejected I wonder if I'm using the right mailing list f
I propose to add an alternative (backward compatible) short array
creation syntax:
$a = [ 1, 2, 3 ]; and $a = [ 'a' => 42, 'b' => "foo" ];
It can also be used in function calls:
img(['src' => "logo.gif", 'alt' => "Logo"]);
Reason behind this change: Arrays are used a lot and should therefore
hav
88 matches
Mail list logo