On Fri, Apr 2, 2021 at 3:14 AM Aaron Piotrowski <aa...@trowski.com> wrote:
> > > On Apr 1, 2021, at 2:03 PM, Levi Morrison via internals < > internals@lists.php.net> wrote: > > > > I do not care which name is chosen, but if we are going to have this > > sort of thing in the language, it ought to be a bottom type, not an > > attribute. > > > > You make an excellent point Levi. I initially chose `noreturn` simply > because I was familiar with the name from C and didn't have a strong > opinion. However, I agree that `noreturn` is a poor choice for reuse as a > bottom type, so I changed my vote to `never`. > i voted against this proposal, but changed my choice of "noreturn" to "never", because it would ultimately be slightly less bad to have this name for use as a bottom type. The name "never" is still unfortunate, because it transmits "behavior" of being used in the context of a function, a better name might have been "nothing" as Levi suggests. But I again get to the point of the problem with this RFC due to naming. "never" is actually combining "nothing" type with "noreturn" flag, so for me the most consistent way would have been "public noreturn function foo(): nothing" Its said that composition is better than inheritance, so combining two behaviors into one keyword will be limiting in the future, if we think of other function flags that should compose with "never". > Cheers, > Aaron Piotrowski > >