Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113463 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 51788 invoked from network); 11 Mar 2021 07:32:39 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Mar 2021 07:32:39 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 41C6C1804B8 for ; Wed, 10 Mar 2021 23:25:05 -0800 (PST) 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.7 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,SPF_NONE,URIBL_BLACK autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mx.kolabnow.com (mx.kolabnow.com [95.128.36.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 10 Mar 2021 23:25:04 -0800 (PST) Received: from localhost (unknown [127.0.0.1]) by ext-mx-out003.mykolab.com (Postfix) with ESMTP id CFBA94097F for ; Thu, 11 Mar 2021 08:25:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-language:content-type :content-type:in-reply-to:mime-version:date:date:message-id:from :from:references:subject:subject:received:received:received; s= dkim20160331; t=1615447502; x=1617261903; bh=D/uRNx9WVc7+tnXhKDA iy+j82/5p5GSWJQqL/2fvlfo=; b=oMugz9v5Wl1dhS1J1hetOOeipp8Mm91YC7+ d12N3o07ly9iwI633IUwacl0XdiMlPkyQh8PqKAAeV2fTiZy7mRXIalgRiBgAsLC tu5EpfRiCx3gWuDRR1/XZ5K1H76YB8bgFnw3JeYtohpMIEUyaOmnerZHLmBYdgYJ kXGyHBdXr+6MzwB6fDkZ8sZZ9ZsnrK2iK08IoWNcNfEsM8OpOW3G5d947OB0MFtw l1U9Y/TS7afCESQwPyvsNGdurc10gZzjqPfGqoosnsxYffFqvdxBMEeKQDLmKZor ypDxrTAyTD9yQLI6fNrzUvzlaKJwn11mZVrSylGZG5TRwR8HhIvqJrivSiqHJyp4 mgCjYxpjDS3XDSl7exwX2uctjrXg6EFRO2sne79k0MivYqQ72xcHFjMzvUUR2fAn cwwGFDe7bxdIjATgNM0UUWx9byuY1MK/zrN4nl2Tv+k1UPLbjvz3+66YIg/BOrkq BKTuza4BQ0pfGwvPR54Vr7KsJADb/wocjSu4K0ZLhQWnrGk344YtouXDu4JwgEGX m8PtMXRBx0b1t6MAluxMIZeKWjykV2Yb2KrR1Y09uhLcgKIno/E6OcIzhe0llPLQ NOIs2PrpdjaT6oFGjFAvy8wVRC4mo4RWeST1sbFY0T62+Jjx3mk1cMPmGtZok4kO 4s+0kEPM= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out003.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rRAw8fFwhHLN for ; Thu, 11 Mar 2021 08:25:02 +0100 (CET) Received: from int-mx001.mykolab.com (unknown [10.9.13.1]) by ext-mx-out003.mykolab.com (Postfix) with ESMTPS id 4B7D24047C for ; Thu, 11 Mar 2021 08:25:02 +0100 (CET) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx001.mykolab.com (Postfix) with ESMTPS id 8ED0A31C for ; Thu, 11 Mar 2021 08:25:01 +0100 (CET) To: internals@lists.php.net References: Message-ID: Date: Thu, 11 Mar 2021 08:24:58 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC] noreturn type From: alec@alec.pl (Aleksander Machniak) On 10.03.2021 20:28, Ben Ramsey wrote: >> I don't like that type covariance would be allowed. Why such an >> exception to the rules? > > It’s not an exception. Returns are covariant. Parameters are > contravariant. Since `noreturn` is a subtype of all other types, it > behaves as expected. I see it's a subtype, I don't get why. Wouldn't it be better to be a separate type so return type covariance is not allowed (as it is with void)? Was it a design decision or a side product of the implementation? -- Aleksander Machniak Kolab Groupware Developer [https://kolab.org] Roundcube Webmail Developer [https://roundcube.net] ---------------------------------------------------- PGP: 19359DC1 # Blog: https://kolabian.wordpress.com