Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126872 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 qa.php.net (Postfix) with ESMTPS id 49D1E1A00BC for ; Thu, 20 Mar 2025 16:57:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1742489700; bh=8U6ZQU0qBGVA3iAjx8lZ59ofJpfHycW0FNtwB23rBa8=; h=Date:From:To:In-Reply-To:References:Subject:From; b=FerNQC2mUalfLdzT5pWPAMZL2TbsNz7NQR8M8YQWC1EhuEKEpnQk2wLajPeD0Z2Nx p0igRPjHtfQER+1NXPPikgOjztI2jUt0G6AFdMr9MD70DK0W9z8qBfkLmR/+uVUTn1 JK5pkHAaBkO2AJrvRmhxgwS5ioOy4ticazakcYVMul0HPcZLqfr7uHzCV6ZvTPS5GY SAy+HAdyXeVa4RazWdggaHXPq0ZrojpD3BRsOyZX0e8gAIvDCbKsvCREB6ceqxFIRP IM+kYHK5Z0B4SLvCGkYFUXiRici1qIhd8aRVohBgpmO07t3P1Psq+CSPxOqHhGdIvS ehB8FTAI2YacQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 810BA1801D5 for ; Thu, 20 Mar 2025 16:54:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-a4-smtp.messagingengine.com (fhigh-a4-smtp.messagingengine.com [103.168.172.155]) (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 ; Thu, 20 Mar 2025 16:54:59 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id B95F211402AD for ; Thu, 20 Mar 2025 12:57:29 -0400 (EDT) Received: from phl-imap-06 ([10.202.2.83]) by phl-compute-04.internal (MEProxy); Thu, 20 Mar 2025 12:57:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm1; t=1742489849; x=1742576249; bh=RWr48bVJFEIcHzuUw2wTA HCgPQDAIpU1Oq4RU9Y2ybY=; b=gaywkPjejlmVfPl/FULJ8xUU2wfwLVxvKk4Jr q6RGYHx8tnwjwg7Uqxh0lMt3IPEpCn9wyV6G2zdbF5LyAnQLTF2aTGneUb8W6umz C31dOk0DzCBDbBRtUvIzMRNgSYSl6nc/lKKHwTJsCqlldtBZu3gamxf2+a/Vq+Y9 khfLhDOlky+wbb/Mzl6k9DHb/FY3WkZrb+1Vs+ArDhLFzPiuRQW4+5Boc7rX3Pf0 jPpi7jQfuTSI0CgRUMW2jeXCGg8Ab6ftoWl3i0csWirU4OZwUTiU59f/6vgQlWCg BXR+iIqibd5MLHV2wd+WT0AnPNnyqQ4Jp8xYWpE1M54nPYjTA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1742489849; x=1742576249; bh=R Wr48bVJFEIcHzuUw2wTAHCgPQDAIpU1Oq4RU9Y2ybY=; b=IJ6L4h/IegbZpGX/p IHVhp0+sLYMCQ4ElQsEXIX4pQgV5WFq20DeSYkOcJ0tC2yT8ziebJ+HW2n7jXUuk +EEitZuNb4empsDxqd3UKpTyKahXO5akfLlk/PL906WbehufABIwJSCu5IM+/tKS bY0/A1sd/r4jDAi9BL6rMoeEAz50Xk8zeIJsX7CukiChGP9ECTEc9CNDL3egSJwk 15iZT5yMSqf8N+9lij1oVTp4nSMRxVPplqpfKt9f49z28vZh6y9PRrWye/KAm84D gE1HdZeEhXjAPpiXgdKBnm0bsxLfFdE+k4y4bwq0EkCCy2UsoL7U19/SrVQFKDZo IYNCA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddugeekjeehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepofggfffhvffkjghfufgtgfesthejredtredt tdenucfhrhhomhepfdfnrghrrhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrh hfihgvlhguthgvtghhrdgtohhmqeenucggtffrrghtthgvrhhnpedugedvlefgueegheef jeetffduveeltefhfeegjeffffelgedttdevkeegkedugfenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlught vggthhdrtghomhdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtg hpthhtohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 7190C29C006A; Thu, 20 Mar 2025 12:57:29 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: T499b434fb43e9cfc Date: Thu, 20 Mar 2025 11:57:09 -0500 To: "php internals" Message-ID: In-Reply-To: References: <3e35cd25-c851-4ecc-8a1b-102dadb226e5@app.fastmail.com> Subject: Re: [PHP-DEV] [RFC] [Discussion] Never parameters Content-Type: text/plain Content-Transfer-Encoding: 7bit From: larry@garfieldtech.com ("Larry Garfield") On Thu, Mar 20, 2025, at 11:24 AM, Gina P. Banyard wrote: > As the person that had the initial discussion in R11 with Jordan [1] > never as a parameter type for an interface actually is not the solution > for "poor man generics". > Matthew Fonda [2] already replied to the thread pointing out the remark > Nikita made in the discussion of the previous RFC. > But importantly, going from mixed parameter type to a generic parameter > type is *allowed* and not a BC change, > however, going from a never parameter type to a generic parameter type > is a BC break. To clarify, you're saying this: interface I { pubic function foo(mixed $a); } class C implements I { public function foo(mixed $b) { ... } } Can turn into this: interface I { pubic function foo(A $a); } class C implements I { public function foo(Foo $b) { ... } } But this could not turn into that: interface I { pubic function foo(never $a); } class C implements I { public function foo(Foo $b) { ... } } Am I following that? Because just from writing that I am not sure I agree, which means I may be misunderstanding. :-) --Larry Garfield