Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127575 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id DDC9F1A00BC for ; Wed, 4 Jun 2025 08:51:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1749026937; bh=5s+/i/zzxs6mX63sefUAsiKaVA3shmFDxGBmMKE1iGw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=k3mstTALsoQGZueUHnr2nJbagnbv+wNN3JNYrUR+F64rL4AVWag+UHqGYoPWbZAw/ H+0ObPatz61NmcdX0OQaC+tvLESsSPcfFUXHuGnFlhkDqhXzrLchgV0v+UU1NS0rtY 8Rh6aidJUyVuN8gQlZTeNzKYjKtfRBuHe51Hz0p84hlOqzC1vqNNnRMsh0AYMS5Vz6 B8FpjJRDEphggHTmgFNlmbvhIGWKqoQgXk0hgxvSqJrjdND+LN5LQzeDu6KYtJNqJ4 b72KXBWd3f94xw7f4tVUjjnHOVmDdzONmGLEuvzg/Ltv3ntGxOJ4F0UBS9UN7z/vyR Sd1Jzdh7TITXA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id F2194180081 for ; Wed, 4 Jun 2025 08:48:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 4 Jun 2025 08:48:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1749027057; bh=dIWYKaW1gtAtcZlsAr4BAcG6GcLPDk5woSLK/bTeWQg=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=nLT7bm5HhzbEUHjHv/xcyFJxdYCYuVv0dZSdFItsXQBFMVe0MFZz29dIxweuUz1M+ FxGsLFwHURDy88B8NCz1Jhs6DYtoriB6hkC8KDbYU+HCQRI4ccZqvYPwvixO9UxhuB TWBjeicvScs/NhiC9WngUGoGG+DXnZKoMEj1n7K13TmCs/T1uvalzEG6oRplQHf06I AUcLdpKv3IxNHJpSUm9+ZLKbvf4svH4JWvquEDOlCPbTev+UybjAoxLIxXP1+eWVOh vtTJwd4Cvl6gayo/jB8rakUUD19Z2HLqgTRxR60KhMILoAzsz18+6/uWfT1M3VOZ5J AVFNC1QpDSL5A== Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Wed, 04 Jun 2025 10:50:56 +0200 To: "Gina P. Banyard" Cc: Ilija Tovilo , PHP internals Subject: Re: [PHP-DEV] [RFC] Transform void into an alias for null In-Reply-To: References: <6Z2Ysh6MjYp1nyzuB0bTPJc5srObIcMRqt731JaQeXUJk1f_V_Yo2nRn8WvjI7er7pp7pIUE6WYl5pRwvYrtcrd07nCutyAqKPSsZHmrS-Y=@gpb.moe> Message-ID: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi Am 2025-06-03 17:46, schrieb Gina P. Banyard: >> > IMO, these checks are useful enough not to be removed. >> >> I agree with Ilija (and also Rowan). > > Well, I'm not sure Ilija and Rowan agree between each other. I believe they agree in that the distinction between `void` and `null` is a useful one. > AFAIU Ilija thinks void living on its weird island is good. > Meanwhile, Rowan thinks it is somewhat confusing and that void should > be a subtype of null. But indeed I'm more aligned with Ilija than Rowan (that’s why Rowan’s name is in parentheses). >> To me there is an important semantic difference between “not returning >> anything” >> and “always returning null”. >> I believe that `void` being in a distinct type >> hierarchy is the right choice and when considering “untyped returns” >> to >> be soft-deprecated / discouraged, there are no inconsistencies either. > > Then our type system is not logical as we have a top type that is not > actually a top type. See my reply to your reply to Ilija. Best regards Tim Düsterhus