[PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-03 Thread John Donagher
Hi folks- I brought this up a few months ago, and due to either tacid approval or utter disinterest I was unable to spark a discussion or gather a concensus :) Right now, when a class (or method, or function) is declared, its name is zend_str_tolower()'d. This provides the case-insensitivity th

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-03 Thread Colin Viebrock
> Any opinions? Have I overlooked something that makes this more difficult than > it seems? I'm willing to work on this if I can gather some positive concensus. For one thing, I would have to change all my code from: if (get_class($var)=='foo_class')) { ... } ... to: if (get_class($var

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-03 Thread Wez Furlong
| "John Donagher" <[EMAIL PROTECTED]> > Right now, when a class (or method, or function) is declared, its name > is zend_str_tolower()'d. > it would be nice if the original casing on the class name was persisted > so that functions like get_class would return the actual *as-declared* > class name

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-03 Thread Wez Furlong
On 2001-05-03 22:51:41, "Wez Furlong" <[EMAIL PROTECTED]> wrote: > | "John Donagher" <[EMAIL PROTECTED]> > > Right now, when a class (or method, or function) is declared, its name > > is zend_str_tolower()'d. > > it would be nice if the original casing on the class name was persisted > > so that f

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-03 Thread Andrei Zmievski
On Thu, 03 May 2001, Wez Furlong wrote: > I just read Colins comments (but deleted the message already!). > > OK, so +1 to get_declared_class() which returns the class name with > original case preserved. Umm, that sounds kind of arbitrary. There could be an optional parameter to get_class(), ge

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-03 Thread Sterling Hughes
On Thu, 3 May 2001, Wez Furlong wrote: > On 2001-05-03 22:51:41, "Wez Furlong" <[EMAIL PROTECTED]> wrote: > > | "John Donagher" <[EMAIL PROTECTED]> > > > Right now, when a class (or method, or function) is declared, its > name > > > is zend_str_tolower()'d. > > > it would be nice if the original

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-03 Thread Wez Furlong
On 2001-05-03 22:53:49, "Andrei Zmievski" <[EMAIL PROTECTED]> wrote: > On Thu, 03 May 2001, Wez Furlong wrote: > > OK, so +1 to get_declared_class() which returns the class name with > Umm, that sounds kind of arbitrary. There could be an optional > parameter to get_class(), get_parent_class(), an

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-03 Thread John Donagher
Hi Sterling- There are implementation-specific reasons of why this can be useful, but I was hoping to avoid the "I can't see why you'd want this" (very common on this list, and something I'm also guilty of, but limiting to the evolution of the language IMHO) argument in favor of "semantically th

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-03 Thread Andi Gutmans
At 03:16 PM 5/3/2001 -0400, John Donagher wrote: >Hi Sterling- > >There are implementation-specific reasons of why this can be useful, but I was >hoping to avoid the "I can't see why you'd want this" (very common on this >list, and something I'm also guilty of, but limiting to the evolution of th

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-03 Thread Sterling Hughes
On Thu, 3 May 2001, John Donagher wrote: > > Hi Sterling- > > There are implementation-specific reasons of why this can be useful, but I was > hoping to avoid the "I can't see why you'd want this" (very common on this > list, and something I'm also guilty of, but limiting to the evolution of the

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-03 Thread Andrei Zmievski
At 02:38 AM 5/4/01 +0300, Andi Gutmans wrote: I don't think it is trivial to implement this without: >a) Creating a second version of our hash tables (I don't like duplicate code). >b) Adding more complexity to the already complex hash tables. I may be missing something here, but why not simply a

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-03 Thread Andi Gutmans
At 06:46 PM 5/3/2001 -0500, Andrei Zmievski wrote: >At 02:38 AM 5/4/01 +0300, Andi Gutmans wrote: >I don't think it is trivial to implement this without: >>a) Creating a second version of our hash tables (I don't like duplicate >>code). >>b) Adding more complexity to the already complex hash tabl

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-03 Thread Andrei Zmievski
At 02:50 AM 5/4/01 +0300, Andi Gutmans wrote: >I still don't think this is something lots of PHP users will benefit from. >On the contrary, I think semantically it is more correct to define what >the case insensitivity means (names are converted to lower case). >How many examples can you think o

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-03 Thread Andi Gutmans
At 06:54 PM 5/3/2001 -0500, Andrei Zmievski wrote: >At 02:50 AM 5/4/01 +0300, Andi Gutmans wrote: >>I still don't think this is something lots of PHP users will benefit >>from. On the contrary, I think semantically it is more correct to define >>what the case insensitivity means (names are conve

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-03 Thread Andrei Zmievski
At 03:12 AM 5/4/01 +0300, Andi Gutmans wrote: >In the constructor of your class you can save the class name to a variable >if it's that important to you :) -Andrei -- PHP Development Mailing List To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mai

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-03 Thread John Donagher
We use a Java-style methodology of naming classes as well as filenames, something we've adopted largely because of our use of PHPDoc. So, if you have a class FooBar, that class is defined in FooBar.cls, not foobar.cls. If get_class() returned the as-declared name, we'd have a really easy way to k

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-04 Thread Andi Gutmans
At 05:01 PM 5/3/2001 -0400, John Donagher wrote: >We use a Java-style methodology of naming classes as well as filenames, >something we've adopted largely because of our use of PHPDoc. So, if you >have a >class FooBar, that class is defined in FooBar.cls, not foobar.cls. If >get_class() returned

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-04 Thread Colin Viebrock
> I don't think it is trivial to implement this without: > a) Creating a second version of our hash tables (I don't like duplicate code). > b) Adding more complexity to the already complex hash tables. I don't know enough about Zend internals to speak with any authority, but wouldn't an "easy" wa

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-04 Thread Sterling Hughes
On Fri, 4 May 2001, Colin Viebrock wrote: > > I don't think it is trivial to implement this without: > > a) Creating a second version of our hash tables (I don't like duplicate > code). > > b) Adding more complexity to the already complex hash tables. > > I don't know enough about Zend internals

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-04 Thread Zeev Suraski
The question was under what key the class entry should be stored... At any rate, it's a non-issue; Saving the 'beautiful' version of the class name is possible, but is a bit hacky IMHO. There should be an optional case sensitive mode, and we'll introduce one in one of the future versions of

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-04 Thread Shaun Batterton
Good work Zeev. It's for a good cause. Everyone else just seems to be whining... "i don't wanna". Shaun On Fri, 4 May 2001, Zeev Suraski wrote: > The question was under what key the class entry should be stored... At any > rate, it's a non-issue; Saving the 'beautiful' version of the clas

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-04 Thread Colin Viebrock
> The question was under what key the class entry should be stored... At any > rate, it's a non-issue; Saving the 'beautiful' version of the class name > is possible, but is a bit hacky IMHO. There should be an optional case > sensitive mode, and we'll introduce one in one of the future version

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-04 Thread Chuck Hagenbuch
Quoting Colin Viebrock <[EMAIL PROTECTED]>: > One "problem" with case sensitivity (perhaps) is that it may make some > scripts non-portable. That's a problem with it being an option, yes. I'd vote for just making php case sensitive, period. -chuck -- must... find... acorns... *thud* -- PHP D

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-04 Thread Sterling Hughes
On Fri, 4 May 2001, Chuck Hagenbuch wrote: > Quoting Colin Viebrock <[EMAIL PROTECTED]>: > > > One "problem" with case sensitivity (perhaps) is that it may make some > > scripts non-portable. > > That's a problem with it being an option, yes. I'd vote for just making php > case sensitive, period.

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-04 Thread Wez Furlong
On 2001-05-04 20:01:42, "Colin Viebrock" <[EMAIL PROTECTED]> wrote: > One "problem" with case sensitivity (perhaps) is that it may make some > scripts non-portable. > > Say I develop a super-duper PEAR class using case-sensitive code (cause > that's what I have on my server). Someone who is runn

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-04 Thread Wez Furlong
"Sterling Hughes" <[EMAIL PROTECTED]> wrote: > On Fri, 4 May 2001, Chuck Hagenbuch wrote: > > That's a problem with it being an option, yes. I'd vote for > > just making php case sensitive, period. > +1 for that! :) +1 --Wez. -- PHP Development Mailing List To unsubscri

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-04 Thread Shaun Batterton
Y'all need to stop. If this feature is optional, then it won't affect any existing scripts, and on the other hand, people may actually benifit from the change. If someone uses the optional feature, and it makes that script non-portable then that is that person's problem. This is just a roadbloc

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-04 Thread Joe Brown
1++; ""Wez Furlong"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > "Sterling Hughes" <[EMAIL PROTECTED]> wrote: > > On Fri, 4 May 2001, Chuck Hagenbuch wrote: > > > That's a problem with it being an option, yes. I'd vote for > > > just making php case sensiti

Re: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-04 Thread Zeev Suraski
Guys, We're not holding votes about this stuff. Definitely not now. Without trying to initiate a discussion, please bear in mind that if we break compatibility completely, we're screwing companies that chose PHP. It'll put PHP in a very unprofessional light. Food for thought; We're way too

AW: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-09 Thread Harald Radi
ion should be lowercase, but how about exported classes ? is there a guidline for this ? harald. > -Ursprüngliche Nachricht- > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag > von Chuck Hagenbuch > Gesendet: Freitag, 04. Mai 2001 21:10 > An: [EMAIL PROTECTED] >

Re: AW: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-09 Thread Jani Taskinen
t exported classes ? is there a guidline >for this ? See above. --Jani >harald. > >> -Ursprüngliche Nachricht- >> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag >> von Chuck Hagenbuch >> Gesendet: Freitag, 04. Mai 2001 21:10 >> An: [EMAIL P

Re: AW: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-09 Thread Sterling Hughes
On Thu, 10 May 2001, Jani Taskinen wrote: > On Thu, 10 May 2001, Harald Radi wrote: > > >looking forward to getting php case sensitive i'm just wondering that > > Me too. > > >function names are exported mixed case in the com extension. > >e.g. there's a COM_load() and a com_set(), is there a spe

Re: AW: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-09 Thread Jani Taskinen
On Wed, 9 May 2001, Sterling Hughes wrote: >On Thu, 10 May 2001, Jani Taskinen wrote: >> This is just because some developers don't like to follow the guidelines. >> As, I quote, "it woulnd't be fun anymore" or "you can't force anyone". > >Hrrmmm.. Which guidelines would those be? And no, you ca

Re: AW: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-09 Thread Sterling Hughes
On Thu, 10 May 2001, Jani Taskinen wrote: > On Wed, 9 May 2001, Sterling Hughes wrote: > > >On Thu, 10 May 2001, Jani Taskinen wrote: > >> This is just because some developers don't like to follow the guidelines. > >> As, I quote, "it woulnd't be fun anymore" or "you can't force anyone". > > > >H

Re: AW: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-10 Thread Zeev Suraski
At 06:46 10/5/2001, Harald Radi wrote: >looking forward to getting php case sensitive i'm just wondering that >function names are exported mixed case in the com extension. >e.g. there's a COM_load() and a com_set(), is there a special reason for >this (zeev) ? There's no special reason, and it's

Re: AW: [PHP-DEV] 4.1 & Declaration Case Persistance

2001-05-10 Thread Harald Radi
"Sterling Hughes" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:<[EMAIL PROTECTED]>... > On Thu, 10 May 2001, Jani Taskinen wrote: > > > On Wed, 9 May 2001, Sterling Hughes wrote: > > > > >On Thu, 10 May 2001, Jani Taskinen wrote: > > >> This is just because some developers don't like to follo