Re: AW: AW: [PHP-DEV] dropping curly braces

2005-11-20 Thread Ian P. Christian
On Sunday 20 November 2005 23:18, George Schlossnagle wrote: > Doesn't work to well with > > $$moo{1}; Didn't think of that :) > or > > $moo = array( 1 => 'foo'); > $moo{1}; I actaully didn't even know you could do that :) So.. ignore my regex, but not my comment about decent docmentation for

Re: AW: AW: [PHP-DEV] dropping curly braces

2005-11-20 Thread George Schlossnagle
Ian P. Christian wrote: On Sunday 20 November 2005 22:27, Ian P. Christian wrote: If this change included a simple sed command that could be applied to code to fix 'legacy' code Sorry, should have included this... For example: $ cat test $ sed -e 's/$\([a-zA-Z][a-zA-Z0-9]*\){\(

Re: AW: AW: [PHP-DEV] dropping curly braces

2005-11-20 Thread Ian P. Christian
On Sunday 20 November 2005 22:27, Ian P. Christian wrote: > If this change included a simple sed command that could be applied to code > to fix 'legacy' code Sorry, should have included this... For example: $ cat test $ sed -e 's/$\([a-zA-Z][a-zA-Z0-9]*\){\([0-9]*\)}/substr($\1,\2,1)/g' test

Re: AW: AW: [PHP-DEV] dropping curly braces

2005-11-20 Thread Ian P. Christian
On Sunday 20 November 2005 22:21, Christian Schneider wrote: > I second that as people on the list here are undecided about the removal > of {} for strings. Keeping that warning creates even more confusion > about a really minor issue (having two ways of accesing strings offsets). Whilst I'm not r

Re: AW: AW: [PHP-DEV] dropping curly braces

2005-11-20 Thread Christian Schneider
Sascha Schumann wrote: 16 Nov 2005, PHP 5.1 Release Candidate 5 - Added an E_STRICT warning on the usage of {} for accessing of string offsets. (Ilia) I suggest removing that warning immediately until the matter is resolved. I second that as people on the list here are undecided abou

Re: AW: [PHP-DEV] dropping curly braces

2005-11-20 Thread Roman Ivanov
Rasmus Lerdorf wrote: The PHP 6 stuff is still up in the air. The original suggestion was to carry through with the deprecation of [] which I strongly vetoed since it would break everything. We can revisit whether we want to remove {} in PHP 6. I didn't think people had such strong feelings

Re: [PHP-DEV] dropping curly braces

2005-11-20 Thread Oliver Grätz
Roman Ivanov schrieb: > Christian Schneider wrote: > >>Please think twice before breaking BC light-heartedly. > > > Please brake BC completely, and rename everything, and reorder > arguments, and replace array() with a(), and replace $this-> with > something consise, and replace '->' with '.',

Re: [PHP-DEV] dropping curly braces

2005-11-19 Thread Roman Ivanov
Christian Schneider wrote: Please think twice before breaking BC light-heartedly. Please brake BC completely, and rename everything, and reorder arguments, and replace array() with a(), and replace $this-> with something consise, and replace '->' with '.', and replace '.' with '~'. *smiley*

Re: [PHP-DEV] dropping curly braces

2005-11-18 Thread Tim Van Wassenhove
On 2005-11-18, Robert Cummings <[EMAIL PROTECTED]> wrote: > On Fri, 2005-11-18 at 03:12, Derick Rethans wrote: >> On Thu, 17 Nov 2005, Robert Cummings wrote: >> >> > On Thu, 2005-11-17 at 16:42, Rasmus Lerdorf wrote: >> > > Andreas Korthaus wrote: >> > > >> > > > Can someone tell me the reason fo

AW: AW: AW: [PHP-DEV] dropping curly braces

2005-11-18 Thread Matthias Pigulla
> I suggest removing that warning immediately until the matter > is resolved. +1 ( times the discount-for-rants-factor ) -mp -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: AW: AW: [PHP-DEV] dropping curly braces

2005-11-18 Thread Sascha Schumann
16 Nov 2005, PHP 5.1 Release Candidate 5 - Added an E_STRICT warning on the usage of {} for accessing of string offsets. (Ilia) I suggest removing that warning immediately until the matter is resolved. - Sascha -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe

AW: AW: [PHP-DEV] dropping curly braces

2005-11-18 Thread Matthias Pigulla
> For the 13th time. {} is not going away in 5.1. >From the NEWS file: 16 Nov 2005, PHP 5.1 Release Candidate 5 - Added an E_STRICT warning on the usage of {} for accessing of string offsets. (Ilia) That is, code that has been tested with RC4 and that worked (not even a notice on whatever err

RE: [PHP-DEV] dropping curly braces

2005-11-18 Thread Hans Zaunere
Ford, Mike wrote on Friday, November 18, 2005 7:58 AM: > On 17 November 2005 21:42, Rasmus Lerdorf wrote: > > > Andreas Korthaus wrote: > > > > > Can someone tell me the reason for this decision? > > > > Very few people converted to using {} so the argument about reading old > > code doesn't r

Re: AW: [PHP-DEV] dropping curly braces

2005-11-18 Thread Sascha Schumann
Maybe you have spoken to the wrong people then. Since {} has been advocated for quite some time as the Right Way to access string offsets, basically all PHP books teach that syntax. As such {} is used very frequently. There are vast amounts of code with that syntax. Breaking

Re: AW: [PHP-DEV] dropping curly braces

2005-11-18 Thread Rasmus Lerdorf
The PHP 6 stuff is still up in the air. The original suggestion was to carry through with the deprecation of [] which I strongly vetoed since it would break everything. We can revisit whether we want to remove {} in PHP 6. I didn't think people had such strong feelings about it. From my chec

Re: AW: [PHP-DEV] dropping curly braces

2005-11-18 Thread Sascha Schumann
Hey, you're still alive? Alive and kicking. - Sascha -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: AW: [PHP-DEV] dropping curly braces

2005-11-18 Thread Derick Rethans
On Fri, 18 Nov 2005, Sascha Schumann wrote: > And it really should not be going away in PHP 6 either. I > don't get why you are suggesting to expend so many resources > as part of a migration effort while it is obvious that there > are no advantages at all in dropping {}. It make

Re: AW: [PHP-DEV] dropping curly braces

2005-11-18 Thread Sascha Schumann
And it really should not be going away in PHP 6 either. I don't get why you are suggesting to expend so many resources as part of a migration effort while it is obvious that there are no advantages at all in dropping {}. It makes no sense. - Sascha On Fri, 18 Nov 2005, Rasm

Re: AW: [PHP-DEV] dropping curly braces

2005-11-18 Thread Rasmus Lerdorf
Matthias Pigulla wrote: Even the attempt of trying to change or remove some language feature like the {} thing IN A RC5 is unbelievably unprofessional. For the 13th time. {} is not going away in 5.1. -Rasmus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http:

AW: [PHP-DEV] dropping curly braces

2005-11-18 Thread Matthias Pigulla
Anybody interested in my two cents? (I shouldn't have asked as I'm going to tell you anyway.) "You will break many more scripts by dropping [] for strings than the other way around. Do you agree?" - Heck, this sounds as if you're doing a "let's drop stuff for some technical reason no average PH

Re: [PHP-DEV] dropping curly braces

2005-11-18 Thread Ron Korving
I hear a lot of opinions here on the curly braces issue, and while I don't use them, they're not in the way. I'd say let's keep them in. > > As far a code readability and obviousness goes, I doubt anybody would > > guess their way to the $str{5} syntax. If you were new to > > PHP and you > > we

Re: [PHP-DEV] dropping curly braces

2005-11-18 Thread Marian Kostadinov
+1 for keeping {} sintax in PHP6. It's not fair for all those people who endeavoured to write a good PHP code and followed the recommendations for it. And why should this feature be removed while in the mean time PHP developers are desparately keeping some very very old stuff for BC reasons? This

Re: [PHP-DEV] dropping curly braces

2005-11-18 Thread Hartmut Holzgraefe
Derick Rethans wrote: Don't you think it's useful to allow a convention like {} for strings and [] for arrays, so you can be sure what $str{1} means without looking at any context? No. Derick ok, next stop: "Operator Overloading"? ;) -- Hartmut Holzgraefe, Senior Support Engineer

RE: [PHP-DEV] dropping curly braces

2005-11-18 Thread Ford, Mike
On 17 November 2005 21:42, Rasmus Lerdorf wrote: > Andreas Korthaus wrote: > > > Can someone tell me the reason for this decision? > > Very few people converted to using {} so the argument about > reading old > code doesn't really hold. If you go and grep through all the public > code out there

RE: [PHP-DEV] dropping curly braces

2005-11-18 Thread Ford, Mike
On 18 November 2005 11:48, Derick Rethans wrote: > On Fri, 18 Nov 2005, Andreas Korthaus wrote: > > > Derick Rethans wrote: > > > > > > That's the problem - also grep does not know if [] is used for > > > > arrays or stings. That's the same for programmers, it's often > > > > not easy to conclud

Re: [PHP-DEV] dropping curly braces

2005-11-18 Thread Derick Rethans
On Fri, 18 Nov 2005, Andreas Korthaus wrote: > Derick Rethans wrote: > > > > That's the problem - also grep does not know if [] is used for arrays or > > > stings. That's the same for programmers, it's often not easy to conclude > > > from > > > context - that's my point. > > > > grep won't, but

Re: [PHP-DEV] dropping curly braces

2005-11-18 Thread Andreas Korthaus
Derick Rethans wrote: That's the problem - also grep does not know if [] is used for arrays or stings. That's the same for programmers, it's often not easy to conclude from context - that's my point. grep won't, but php -l will. That's true. But what about "reducing complexity"? Don't you t

Re: [PHP-DEV] dropping curly braces

2005-11-18 Thread Robert Cummings
On Fri, 2005-11-18 at 03:12, Derick Rethans wrote: > On Thu, 17 Nov 2005, Robert Cummings wrote: > > > On Thu, 2005-11-17 at 16:42, Rasmus Lerdorf wrote: > > > Andreas Korthaus wrote: > > > > > > > Can someone tell me the reason for this decision? > > > > > > Very few people converted to using {

Re: [PHP-DEV] dropping curly braces

2005-11-18 Thread Derick Rethans
On Fri, 18 Nov 2005, Andreas Korthaus wrote: > > If you go and grep through all the public code out there, pretty much none > > of it uses {} for character offsets. > > That's the problem - also grep does not know if [] is used for arrays or > stings. That's the same for programmers, it's often n

Re: [PHP-DEV] dropping curly braces

2005-11-18 Thread Derick Rethans
On Thu, 17 Nov 2005, Robert Cummings wrote: > On Thu, 2005-11-17 at 16:42, Rasmus Lerdorf wrote: > > Andreas Korthaus wrote: > > > > > Can someone tell me the reason for this decision? > > > > Very few people converted to using {} so the argument about reading old > > Ugh, so those of us that

Re: [PHP-DEV] dropping curly braces

2005-11-17 Thread Jani Taskinen
Just a friendly note from my PHP user side: We had 2 places where {} where used for accessing string. Took me 10 seconds to remove those with the help of the nice E_STRICT error. (filename, linenumber) --Jani On Thu, 17 Nov 2005, Rasmus Lerdorf wrote: Andreas Korthaus w

Re: [PHP-DEV] dropping curly braces

2005-11-17 Thread Andreas Korthaus
Hi Andrei! Andrei Zmievski wrote: You will break many more scripts by dropping [] for strings than the other way around. Do you agree? Until tonight I was sure that only a few projects still use the [] syntax which is depreciated for 5 years. But if some of you don't think so I'm probably wr

Re: [PHP-DEV] dropping curly braces

2005-11-17 Thread Andrei Zmievski
You will break many more scripts by dropping [] for strings than the other way around. Do you agree? -Andrei On Nov 17, 2005, at 3:26 PM, Andreas Korthaus wrote: OK, but by dropping {} for strings you also remove the possibility to have a convention like "[] for arrays and {} for strings".

Re: [PHP-DEV] dropping curly braces

2005-11-17 Thread Andrei Zmievski
How do you know this? Have you conducted polls? -Andrei On Nov 17, 2005, at 3:19 PM, Jevon Wright wrote: Is there anything wrong with having a convention for character access of strings? Most PHP programmers see {} as string access and [] as array access - sure, they might be functionally

Re: [PHP-DEV] dropping curly braces

2005-11-17 Thread Andreas Korthaus
Rasmus Lerdorf wrote: And you are willing to break just about every application out there for this? I didn't know how many applications use [] with strings. I only know a lot of applications using {}. The point is not "breaking existing apps", but destroy a sensable convention, which is us

Re: [PHP-DEV] dropping curly braces

2005-11-17 Thread Robert Cummings
On Thu, 2005-11-17 at 19:05, Rasmus Lerdorf wrote: > Robert Cummings wrote: > > On Thu, 2005-11-17 at 18:33, Ilia Alshanetsky wrote: > >> Andreas Korthaus wrote: > >>> OK, but by dropping {} for strings you also remove the possibility to > >>> have a convention like "[] for arrays and {} for string

Re: [PHP-DEV] dropping curly braces

2005-11-17 Thread Rasmus Lerdorf
Robert Cummings wrote: On Thu, 2005-11-17 at 18:33, Ilia Alshanetsky wrote: Andreas Korthaus wrote: OK, but by dropping {} for strings you also remove the possibility to have a convention like "[] for arrays and {} for strings". If I could decide I would drop {} for arrays and [] for strings, b

Re: [PHP-DEV] dropping curly braces

2005-11-17 Thread Robert Cummings
On Thu, 2005-11-17 at 18:51, Robert Cummings wrote: > On Thu, 2005-11-17 at 18:33, Ilia Alshanetsky wrote: > > Andreas Korthaus wrote: > > > OK, but by dropping {} for strings you also remove the possibility to > > > have a convention like "[] for arrays and {} for strings". > > > If I could decide

Re: [PHP-DEV] dropping curly braces

2005-11-17 Thread Robert Cummings
On Thu, 2005-11-17 at 18:33, Ilia Alshanetsky wrote: > Andreas Korthaus wrote: > > OK, but by dropping {} for strings you also remove the possibility to > > have a convention like "[] for arrays and {} for strings". > > If I could decide I would drop {} for arrays and [] for strings, but I > > fear

Re: [PHP-DEV] dropping curly braces

2005-11-17 Thread Ilia Alshanetsky
Andreas Korthaus wrote: > OK, but by dropping {} for strings you also remove the possibility to > have a convention like "[] for arrays and {} for strings". > If I could decide I would drop {} for arrays and [] for strings, but I > fear I will not be asked to decide... ;-) You may think that {} an

Re: [PHP-DEV] dropping curly braces

2005-11-17 Thread Rasmus Lerdorf
Andreas Korthaus wrote: OK, but by dropping {} for strings you also remove the possibility to have a convention like "[] for arrays and {} for strings". If I could decide I would drop {} for arrays and [] for strings, but I fear I will not be asked to decide... ;-) And you are willing to break

Re: [PHP-DEV] dropping curly braces

2005-11-17 Thread Andreas Korthaus
Rasmus Lerdorf wrote: Andreas Korthaus wrote: But you know without understanding of any context, that it's the 6th character of the string "$str". When you see $var[5], it could be the 6th character of a string, or an element of an array... and what about the value? You can't be sure that it's

Re: [PHP-DEV] dropping curly braces

2005-11-17 Thread Jevon Wright
From: Rasmus Lerdorf <[EMAIL PROTECTED]> > Subject: Re: [PHP-DEV] dropping curly braces > Sent: 17 Nov '05 12:11 > > Andreas Korthaus wrote: > >> As far a code readability and obviousness goes, I doubt anybody would > >> guess their way to the

Re: [PHP-DEV] dropping curly braces

2005-11-17 Thread Rasmus Lerdorf
Andreas Korthaus wrote: As far a code readability and obviousness goes, I doubt anybody would guess their way to the $str{5} syntax. But you know without understanding of any context, that it's the 6th character of the string "$str". When you see $var[5], it could be the 6th character of a st

Re: [PHP-DEV] dropping curly braces

2005-11-17 Thread Andreas Korthaus
Hi Rasmus! Rasmus Lerdorf wrote: Very few people converted to using {} so the argument about reading old code doesn't really hold. I can't belive that most of the code today is based on <=PHP3 code. I'm not talking about such "PHP3 based" code. I'm talking about code, you wrote 1 year ago

Re: [PHP-DEV] dropping curly braces

2005-11-17 Thread Robert Cummings
On Thu, 2005-11-17 at 16:42, Rasmus Lerdorf wrote: > Andreas Korthaus wrote: > > > Can someone tell me the reason for this decision? > > Very few people converted to using {} so the argument about reading old Ugh, so those of us that did are going to have to comb back through our code and rever

Re: [PHP-DEV] dropping curly braces

2005-11-17 Thread Christian Schneider
Rasmus Lerdorf wrote: Very few people converted to using {} so the argument about reading old code doesn't really hold. If you go and grep through all the public code out there, pretty much none of it uses {} for character offsets. I'd like to cite Andi here: "Regarding BC breakage. I'm not

Re: [PHP-DEV] dropping curly braces

2005-11-17 Thread Rasmus Lerdorf
Andreas Korthaus wrote: Can someone tell me the reason for this decision? Very few people converted to using {} so the argument about reading old code doesn't really hold. If you go and grep through all the public code out there, pretty much none of it uses {} for character offsets. And in

[PHP-DEV] dropping curly braces (was: PHP 5.1.0R5 Released)

2005-11-17 Thread Andreas Korthaus
Hi! Ilia Alshanetsky wrote: Once again, I encourage everyone to take the time to try out this RC and test it against your code or simply run "make test". Works fine for me, but I've a question about the dropped curly braces. Has there been some public discussion about it recently? I'm sorry if