Re: [RFC] Io\Terminal
| From: | Rob Landers | Date: | Tue, 01 Dec 2026 09:34:57 +0000 |
| Subject: | Re: [RFC] Io\Terminal | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-133269@lists.php.net to get a copy of this message | ||
On Tue, Dec 1, 2026, at 09:58, Tim Düsterhus wrote:
> Hi
>
> It is not clear to me why
readLine() returns
> null on EOF instead of
> throwing. This is inconsistent with readSecret() as the closest
>
> relative (since it also reads entire lines), and breaks the pattern in
> the try-catch example in the “Error Model” section.
>
> Best regards
> Tim Düsterhus
>
I really hope readLine() doesn't throw on someone pressing [enter] ... that
doesn't feel "exceptional" to me.
— Rob