Re: 4.1 & Declaration Case Persistance
| From: | Andi Gutmans | Date: | Thu, 03 May 2001 23:38:19 +0000 |
| Subject: | Re: 4.1 & Declaration Case Persistance | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-53748@lists.php.net to get a copy of this message | ||
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 the language IMHO) argument in favor of "semantically that's probably the right way to do it, but it's not real important", which is why I'm willing to make the change if the concensus is that the change would be the right thing. I definetly believe it's not real important and will have no visible benefit to "most people". What I want to be sure of is that it won't hurt "most people" either. I'm not sure if the speed decrease would be noticeable. I don't get your argument about it being a kludge; I think what we have now is the kludge. I do agree a get_declared_class() would probably have a high WTF factor, which is why I favor changing the original to (like Andrei said) accept a parameter which determines its behavior.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 think any of these two options warrants a feature which maybe three PHP users will be dependent on. Talking about semantics, as the class name is defined as case insensitive it actually does make some kind of sense of declaring a consistent way the "symbols" will look after compilation, i.e., lower case letters. This is similar to how other case insensitive compilers work. If lots of people completely disagree with me then we can take a look at your patches and see if they make sense both on a complexity level and a performance level. I know this isn't the answer you want to hear but this code is fragile, the hash tables are used by just about any part in PHP and on a whole I just don't think it's worth it. It's not like a great feature everyone has been missing and semantically it's not obviously more right than the way it is today. Andi