Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113935 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 71651 invoked from network); 3 Apr 2021 15:32:23 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Apr 2021 15:32:23 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 302411804B2 for ; Sat, 3 Apr 2021 08:30:38 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 3 Apr 2021 08:30:37 -0700 (PDT) Received: by mail-wr1-f53.google.com with SMTP id e18so7091925wrt.6 for ; Sat, 03 Apr 2021 08:30:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beberlei-de.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nE26CRxoj9Sre3euxNC52o1MppVWx5CAaSmBWWpKyRs=; b=KGsGb+kidbwPZP2DPXmYBWsytD3PcnXrDqPZYr64FaM0K2XSiSJJxNaAS0kVW8ZP5H lwHTqF+uqprONCgw44DV7B1q5QU8/fIesetXIVXDyXBv8a+FyU66pj8xs9DHov7paP9j yeGyVaWHSwjNmuTBVkxyc8AXU/YZFQ/ySi55k+MuXaRE8FdGLV+hXprbHO/WxYSYnoJv 9UWfTPGre5qGPksYTQ2NFiuSuXKv/ArxW5WveSkPObl3/CcvmTRMwDswgurLfz27g+Zf u5CnL08HgZDGD4pE8sqZq364OwECqJpoRw8LqJ1ypUW/72lYxd8vVk9MBN1ROk6iRgF0 uKGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nE26CRxoj9Sre3euxNC52o1MppVWx5CAaSmBWWpKyRs=; b=CkSMows7n/5aL6ATrrLX1+jKoCiRfr5Iv2tuiM/FdpRwmJ+UCegBHOVlPtqZi/Lnvu oVbouJ63fG7txRYiyil5SWFs0WZI9fdoPn/mr0p4gbg4789CPIas6dz3TDgFumSS/ftL N33t6aRgR+vhB866lTU6K1XTaHc8bjLgeKQBLQ6YYqt4MBZc6/mNj5krPK5NzlV1xlzF P8YWlAJq++X833L3sn7w4iS+PAUKN8VgPKsm11/emDjCPRA9YvjHiMYceAlVfCHz5bSr 9pL4mbMdX4gRYblGLkTFN7dhUz1ImrXZjy5uc8VTCLj6oEJ244AmeUlgfyRzsdY/xyjm Hp4w== X-Gm-Message-State: AOAM531lVG9TzTKqysnul11HHUMnOwbcqOrWMOLqCbcS6LDByZ6iOT7p z+bDG4y4uTx/1zMDr8hA6ozxJHViozUVgbtsx3x3ciVGybA= X-Google-Smtp-Source: ABdhPJxHmwbaXICBDtPdd7w9Xm0Xrr5UMuxdKaJYmvNf6P0V+acslBLi2xcIgUPlx1hP//dlbS2EeNRkBKEMIYIcGE8= X-Received: by 2002:a5d:4688:: with SMTP id u8mr20503956wrq.39.1617463835285; Sat, 03 Apr 2021 08:30:35 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sat, 3 Apr 2021 17:30:24 +0200 Message-ID: To: Aaron Piotrowski Cc: Internals Content-Type: multipart/alternative; boundary="00000000000056e7be05bf132503" Subject: Re: [PHP-DEV] [VOTE] noreturn type From: kontakt@beberlei.de (Benjamin Eberlei) --00000000000056e7be05bf132503 Content-Type: text/plain; charset="UTF-8" On Fri, Apr 2, 2021 at 3:14 AM Aaron Piotrowski 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 > > --00000000000056e7be05bf132503--