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 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.


On one hand you might feel it odd on the other hand it might be odd to a 
developer who knows that classes are case insensitive and when he users 
your framework then he will suddenly discover (or not discover) that 
writing FooBar is different from foobar, i.e., they need to know that when 
using your framework that they need to watch their case and that it is 
unlike any other PHP script or framework. OK that was a too long sentence 
(I'm on the way out) but do you understand that it has implications on the 
developer who is used to case-insensitive classes and doesn't watch his case.



>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
>minor.

Can you describe your workaround?

Think of what I have written. I doubt it'll convince you but you should 
realize that PHP has case insensitive-classes but your framework will have 
classes which are case-sensitive. Does this make sense? It means the people 
who will be using your open-framework will almost be using a different PHP.

Andi


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