RE: [PHP-DEV] Coercive Scalar Type Hints RFC
| From: | Zeev Suraski | Date: | Mon, 23 Feb 2015 23:27:40 +0000 |
| Subject: | RE: [PHP-DEV] Coercive Scalar Type Hints RFC | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-83624@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Anthony Ferrara [mailto:ircmaxell@gmail.com]
> Sent: Tuesday, February 24, 2015 1:12 AM
> To: Zeev Suraski
> Cc: PHP internals
> Subject: Re: [PHP-DEV] Coercive Scalar Type Hints RFC
>
> Well, I am concerned at this error rate we're seeing that we won't cause
> significant perf degradation due to the errors (even with reporting=0).
> And
> that's not mentioning log files.
I'd say that's a feature - excellent motivation to fix these warnings! :)
> > Last, we don't yet have an answer to your question about the billions
> > of lines of code out there. But as I told to Benjamin, we have every
> > intention to try the patch out on some real world apps and see how it
> performs.
> >
> > Let me assure you that if we find that there are hundreds of issues
> > trying to get common apps to work, after we tweak the rules - I'll
> > either retract the RFC or the very least rethink the internal functions
> > part of
> it.
>
> Sounds great. My concern here though is that my instinct says that either
> the
> rules are going to come out so similar to today's rules as to not be
> effective,
> or break enough code that it's not worth it.
>
> Please continue the patch, and let's test iterations. I just don't see
> where the
> magic line will be (not breaking too much while providing enough benefit
> to
> please the proponents of strict types).
I hope we can find that middle ground, triggering a reasonable number of
issues, that will actually gradually push people towards stricter code. But
I agree that the jury is still out on whether that's possible.
I think diving into some of the found issues is as interesting as counting
the number of failures. Are we (with some tweaks) onto a gold mine of
potential issues here, or a torrent of noise? Anyway, we'll see.
Thanks,
Zeev