Re: [RFC] [Discussion] Bound-Erased Generic Types
| From: | Rowan Tommins [IMSoP] | Date: | Sun, 07 Jun 2026 13:20:50 +0000 |
| Subject: | Re: [RFC] [Discussion] Bound-Erased Generic Types | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-131164@lists.php.net to get a copy of this message | ||
On 03/06/2026 23:49, Matthew Brown wrote:
assuming this survey had a representative sample of PHP users ... and that nobody uses both PHPStan and Psalm at the same time ... we would get at best 44% of users employing SA tools. A far cry from the 90% number I’m constantly told In that same survey [1], 68% of respondents say they use PhpStorm, and static analysis is one of the /main /reasons people use PhpStorm.I don't think this is equivalent. PhpStorm only complains if it can prove a type is wrong; and in my experience, there are plenty of people who happily ignore the errors it does flag. To replace the safety of run-time checks, you need a tool that only allows code into production if it can prove that no type errors would happen. That's a different question from "who would a nice syntax for generics be useful for" - I think it would be *useful* even for people coding in a very simple editor, because it makes the code more expressive. But it would be considerably *less useful* if that extra information couldn't actually be trusted because nothing enforced it. -- Rowan Tommins [IMSoP]