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

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: [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