> On 21 Dec 2014, at 10:32 am, Kevin Israel <pleasest...@live.com> wrote:
> 
>> On 12/20/2014 05:16 PM, Paul Dragoonis wrote:
>> It's too big of a BC change firstly.
>> 
>> Secondly it has no language benefit or developer benefit.
> 
> Are you sure? Autoloading schemes such as PSR-4 derive pathnames from
> class names without converting them to lowercase. If case mismatches go
> undetected and unreported, a project might work on a developer's Windows
> desktop (case-insensitive) yet not when uploaded to a Linux web server
> (case-sensitive). Or when an object instantiation or a static method
> call using the correct case is removed from the code, a later call using
> the incorrect case might break.
> 
> Backward compatibility is perhaps a good reason to not make this change.
> However, I would like to see at least an option to report case
> mismatches in class names as E_STRICT errors and possibly a way to
> disable that for specific files or classes when necessary.
> 
>> On 20 Dec 2014 22:01, "F & N Laupretre" <nf.laupre...@yahoo.fr> wrote:
> 
>>> I would like to propose that namespaces, functions, and classes become
>>> case-sensitive (constants are already case-sensitive). Actually, I never
>>> understood why they are case-insensitive. Even if the performance gain is
>>> negligible, I think it could be the right time to question this.
> 
> -- 
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


+1 on E_STRICT warning for case mismatch on class names. Also +1 on eventual 
case sensitivity for userland class names. Not convinced the rest is worth it.

The insensitivity makes code brittle. Sometimes the same code will run fine, 
and other times it breaks depending on what lines triggered the auto loader. If 
you instantiate a Foo instance first, then instantiate a new foo, the code runs 
fine, but if you try to instantiate a new foo first, we get a fatal error.

Cheers,
David
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to