Re: [PHP-DEV] Concept: Lightweight error channels

2025-05-01 Thread Edmond Dantes
Hello. > Suppressing? You mean fataling. Suppressing implies ignore, which is the > exact opposite of what I am proposing. Yes, it seems I didn’t explain my thought clearly. We have the following code: ```php function some(): bool { return false; } function target(): void { if(some()

Re: [PHP-DEV] Concept: Lightweight error channels

2025-05-01 Thread Levi Morrison
On Tue, Apr 29, 2025 at 9:48 AM Paul M. Jones wrote: > > > > > On Apr 27, 2025, at 07:26, Niels Dossche wrote: > > > > Regarding performance however, rather than introducing yet another > > completely new concept to do almost the same thing, why not try to improve > > exception performance inst

Re: [PHP-DEV] Concept: Lightweight error channels

2025-05-01 Thread Levi Morrison
> > Do we consider a difference of 0.075/10s vs 0.115/10s that big a > > deal when compared to (e.g.) establishing a database connection? > > The first part, the 0.075 vs 0.115... yeah, we care. That's 50% > slower. But the thing is, the math with exceptions is kind of knowable > because o

Re: [PHP-DEV] Concept: Lightweight error channels

2025-05-01 Thread Larry Garfield
On Wed, Apr 30, 2025, at 9:18 PM, Morgan wrote: > On 2025-04-28 06:06, Larry Garfield wrote: >> Which is why I think we do want some kind of syntax similar to Rust's ?, so >> the above could be shortened back to this: >> >> function doStuff($id): string raises UserErr { >>$user = $repo->getUs

Re: [PHP-DEV] Concept: Lightweight error channels

2025-05-01 Thread Larry Garfield
On Thu, May 1, 2025, at 7:47 AM, Juris Evertovskis wrote: > On 2025-04-29 17:29, Matthew Weier O'Phinney wrote: > >> >> * Exceptions should not be used for normal application logic flow. If the >> "error" is recoverable and/or expected, use a different mechanism so you can >> use standard condi

Re: [PHP-DEV] Concept: Lightweight error channels

2025-05-01 Thread Paul M. Jones
Hi all, > On May 1, 2025, at 09:29, Levi Morrison wrote: > > On Tue, Apr 29, 2025 at 9:48 AM Paul M. Jones wrote: >> >> >> >>> On Apr 27, 2025, at 07:26, Niels Dossche wrote: >>> >>> Regarding performance however, rather than introducing yet another >>> completely new concept to do almost

Re: [PHP-DEV] Concept: Lightweight error channels

2025-05-01 Thread Juris Evertovskis
On 2025-04-29 17:29, Matthew Weier O'Phinney wrote: * Exceptions should not be used for normal application logic flow. If the "error" is recoverable and/or expected, use a different mechanism so you can use standard conditional branching. As such, there are a lot of situations where I may not

[PHP-DEV] PHP 8.4.7RC2 available for testing

2025-05-01 Thread Saki Takamachi
Hi all! Since RC1 had a regression bug, we have prepared RC2 with some changes reverted. PHP 8.4.7RC2 has just been released and may be downloaded from https://downloads.php.net/~saki/ Or use the git tag: php-8.4.7RC2 Windows binaries are available at: https://windows.php.net/qa/ Please test i