Re: [RFC] noreturn type

From: Date: Thu, 11 Mar 2021 08:23:51 +0000
Subject: Re: [RFC] noreturn type
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-113464@lists.php.net to get a copy of this message
Hi Peter and internals

> On 11 Mar 2021, at 07:51, Peter Stalman <sarkedev@gmail.com> wrote:
> 
> On Wed., Mar. 10, 2021, 11:22 Matthew Brown, <matthewmatthew@gmail.com>
> wrote:
> 
>> If a significant number agree I can add a secondary vote on noreturn vs
>> never, but never introduces more of a BC risk.
>> 
> 
> Hi Matt,
> 
> I like this RFC, but I'd like to see the RFC cover if any other languages
> have a similar return type.

What made it clear to me was this:

returning nothing (void) isn't the same as not returning (noreturn, eg throw or exit).

Having read that somewhere on Twitter made it easier for me to reason about. It's a useful
feature in the static analysis world.

> 
> The definition of void is that it has no return value, so I too agree
> that the keyword noreturn is too close in meaning to void.
> 
> I'd also like to throw the word deadend or something similar into the
> ring, to make things a bit clearer.
> 
> Thanks,
> Peter

Kind regards
Brent


Thread (37 messages)

« previous php.internals (#113464) next »