Re: Proposal for PHP 7 : case-sensitive symbols
| From: | Marco Pivetta | Date: | Mon, 22 Dec 2014 01:02:45 +0000 |
| Subject: | Re: Proposal for PHP 7 : case-sensitive symbols | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-79858@lists.php.net to get a copy of this message | ||
On 22 December 2014 at 01:52, Andrea Faulds <ajf@ajf.me> wrote:
>
> > On 22 Dec 2014, at 00:50, Marco Pivetta <ocramius@gmail.com> wrote:
> >
> > On 22 December 2014 at 01:43, Andrea Faulds <ajf@ajf.me> wrote:
> >
> >> Hey,
> >>
> >>> On 21 Dec 2014, at 23:33, David Muir <davidkmuir@gmail.com> wrote:
> >>>
> >>> 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.
> >>
> >> I’d say that’s not the fault of insensitivity, but the fault of
> >> poorly-written autoloaders.
> >
> >
> > I'd like to know if there's an autoloader that handles case sensitivity
> > without O(2^n) stat calls worst-case scenario (N being namespace/class
> name
> > parts chars).
>
> Yes. Those running on Windows or OS X (both use case-insensitive
> filesystems by default),
>
Except that nobody I know of runs production on a case-insensitive
filesystem.
those that convert the class name to lowercase, those that error on
> non-lowercase class names, etc.
>
That's an interesting idea to be honest: could be brought up in the
composer mailing list, I'd say.
Marco Pivetta
http://twitter.com/Ocramius
http://ocramius.github.com/