Re: [RFC] Exception type hint
| From: | Larry Garfield | Date: | Thu, 30 Jun 2022 15:02:27 +0000 |
| Subject: | Re: [RFC] Exception type hint | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-118135@lists.php.net to get a copy of this message | ||
On Thu, Jun 30, 2022, at 8:35 AM, Dan Ackroyd wrote:
> Antoine wrote:
>> It could be beneficial for the whole ecosystem to have as well exceptions type hint.
>
> Here are my short notes on the topic.
>
> https://github.com/Danack/RfcCodex/blob/master/throws_declaration.md
>
> tl:dr someone probably needs to come up with a strong reason for why
> it would be a good thing.
>
> On Wed, 29 Jun 2022 at 17:39, Larry Garfield <larry@garfieldtech.com> wrote:
>>
>> We are definitely not ready for that kind of fundamental rethink of how error handling
>> works in PHP.
>
> I dunno. The current model is causing quite a few disagreements and
> pain, and you made a good case for how it could be better.
>
> It'd be a huge piece of work, but a better way of handling errors
> would be a significant improvement for PHP.
Oh there's definitely room to improve PHP's error handling, no question. I just
don't know that PHP is, at this time, capable of the "coherent multi-step roadmap so that
different features dovetail together to result in more than the sum of their parts" planning
that would be required to do it right. :-)
--Larry Garfield