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 know
where that class was defined.

When you start getting into complex inheritance and class dependency trees,
this issue finally rears its head. Other than this case, I have never cared.
So, I've had to create a code generator to build a structure containing a
mapping of class declaration names pointing back to filenames, which otherwise
could not be accurately programatically determined. But if you use lowercased
class naming, you can programatically determine the filename. That seems wrong
to me.

We (at my current company) have a clean architecture, something we're working
on incorporating into a currently existing open-source application framework
project to allow other people to use. So yes, three users may be affected by it
now (maybe less :). I really don't want to propogate the kludge I've had to
write out to hundreds of people, though.

Don't change the code because of me, or because of the project I'm working on,
or because of the way PHPDoc works. We've already worked around it.  But I
still maintain that tossing away the declared names is not the only (or the
best) way to achieve case-insensitivity in the language. Believe me, I wouldn't
have wasted cycles thinking/writing about this if I wasn't convinced it will
benefit PHP and its users in the long run, even if the value add is relatively

On Thu, 3 May 2001, 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 converted to lower case).
> >How many examples can you think of where this would actually help a PHP 
> >developer?
> Purely cosmetically, it would be nice. For example, in PHP-GTK I have a lot 
> of error messages that output class names, and it'd be nice to display the 
> names as they were registered by the user/system rather than all lowercased.
> -Andrei


John Donagher
Application Engineer
Intacct Corp. - Powerful Accounting on the Web
720 University Ave.
Los Gatos CA 95032

Public key available off http://www.keyserver.net
Key fingerprint = 4024 DF50 56EE 19A3 258A  D628 22DE AD56 EEBE 8DDD

PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to