Re: [RFC] [Discussion] Deprec ate functions with overloaded signatures
| From: | Rowan Tommins | Date: | Sun, 04 Jun 2023 13:42:50 +0000 |
| Subject: | Re: [RFC] [Discussion] Deprec ate functions with overloaded signatures | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-120523@lists.php.net to get a copy of this message | ||
On 2 June 2023 14:21:49 BST, "Máté Kocsis" <kocsismate90@gmail.com> wrote:
>I hope that I don't sound elitist, but codebases not using static
>analysis... are kind of hopeless...
Then I guess we should just pack up and go home, because right now PHP doesn't even have an
official static analyser, let alone a mandatory one; and the evolution of Hack shows just how much
the language would need to change for such a tool to guarantee full coverage.
The needs of new users being introduced to best practices are different from those maintaining and
modernising existing codebases. Sometimes, they're in direct opposition, but I think we have a
duty to try to support both where we can.
> The purpose is to have the "correct" return type. Is it worth it? Well, it home
> depends... For me, what's important is that PHP becomes a more and
> more predictable and accessible language, and I care less about minimizing
> backward compatibility breaks.
I think Claude is taking the same premise, and reaching a different conclusion: returning true is
consistent with the other methods on the class, and that consistency makes it more predictable and
more accessible.
Regards,
--
Rowan Tommins
[IMSoP]