Re: [RFC] [Discussion] Never parameters
| From: | Tim Düsterhus | Date: | Fri, 21 Mar 2025 11:36:01 +0000 |
| Subject: | Re: [RFC] [Discussion] Never parameters | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-126893@lists.php.net to get a copy of this message | ||
Hi
Am 2025-03-20 21:04, schrieb Juris Evertovskis:
I'm not opposed to having a bottom type, but theIndeed. I said the same in the PR on GitHub: https://github.com/php/php-src/pull/18016#issuecomment-2715887293. Static methods within an interface are not useful. Thetry/tryFromissue feels caused by another shortcoming. In my viewfromandtryFromare factory methods that construct an instance by being called on the class itself. As such they should not be subject to LSP at all, just like __construct is not.
never type would however still be useful for non-static methods in interfaces and to round off the type hierarchy.
Best regards
Tim Düsterhus