Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126722 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 AD3CC1A00BC for ; Tue, 11 Mar 2025 21:46:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1741729425; bh=l1vtuex0pzVYJOVY+YHmBlGk4fz7JNRCXYvpKlBPeYA=; h=Date:From:To:In-Reply-To:References:Subject:From; b=c4Hmw2SmZ0bCV4ilSgGEHqZVkBrXFGpAx7pVdnAdHdVKUVK5ZiQnW6GjXjkuKMWAm 8aOW3hFTfXxbnhD3kLiJojlXz6DrD37FmNmaE5AMNPxjMH57zmZwhqnbXv4/8VOSJC 3q1Pr9jXcF4Fw3corN4ggWSlHBIwtadA2/W8zi4+H63SOfkohQndG6NaQXKZFZECMa 2eywQxZuUBCxriUtBckN3v/C30yldM05Ki4fgtxgSM5U7OqHnMhZwZK7mjHWlHdCo3 kFJzbqmjg9j2xUcrBj2GthcaXeaJnmPofNeXVQTYBpIXxL7rwEtUPC/w75cAlSXeMi vnovu8F7XB/4w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1CDD61801E5 for ; Tue, 11 Mar 2025 21:43:44 +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, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fout-b1-smtp.messagingengine.com (fout-b1-smtp.messagingengine.com [202.12.124.144]) (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 ; Tue, 11 Mar 2025 21:43:33 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id 7549E11401B9 for ; Tue, 11 Mar 2025 17:46:07 -0400 (EDT) Received: from phl-imap-06 ([10.202.2.83]) by phl-compute-04.internal (MEProxy); Tue, 11 Mar 2025 17:46:07 -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=1741729567; x=1741815967; bh=uTbbQI7ougOOSZFeXxiu/ Sc6bgED9uLLX5PjId8N36Y=; b=C8YGUv1mZbqebstMHqjZE8itMfTC/+YBaTTKh oB/kLZjLz+eF3TKyZsa97usPjvtbEFygyLAxw8/bGod4JIr9N/Qj520iyQjOd5/7 Uoe13VDSmGURoSqpeOlhEsXnKLGh5WwiDEjNPaCgufeSp+A7KmH2Iw8j1YDGEXcq D07mGfdmsuFY8a3ntsXMGG5HylzFFEkDvZGlIkvKt9JbkV3GcS3DokMhqbVUQvQS yQlphqWpoWhtkGVLWZp36y1wM++23iDpw3pR/zvNHyAcO3jiP2kUYZVSbvco+BtU LjhnDZ3RkWy/u/RUWMZrpgVvHAVEA2eSrLtwdF27pbBKss1rA== 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=1741729567; x=1741815967; bh=u TbbQI7ougOOSZFeXxiu/Sc6bgED9uLLX5PjId8N36Y=; b=zEttoQQBGKb+0BD59 g6ARAz3o5hAvi+/rUXA0eVvjV+MwZh3R4pI3BKVKvzf26BpKjnYSIp9ZFqVBhJfk 2aMKqrKfKNjrC1dyWozCdjNuEL8KAJ8mx55SS3hQoLIJYsn/yt6GdoTQCmTbVPbS 76OuG18xq0XtK7ok0LyfponR+aBZGvEer1qYVRBjjnJiIL1wbpjSfgyQJ78eSN8u bwgFS6eXxNQ+JFwrKKCnVaRceXwBfQuoWIKBR+9h2uO2oJ7kRBs7INPBWAPZLg/R FdkwoMg6hpHPXgBXY3OSKTCCyH1LsRCLBX9BmQ7eV+l8dYG1788YvbgqBZrgN7vb RARTg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduvdeffedtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepofggfffhvffkjghfufgtgfesthejredtredt tdenucfhrhhomhepfdfnrghrrhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrh hfihgvlhguthgvtghhrdgtohhmqeenucggtffrrghtthgvrhhnpeelfeefleevvdffueej gfegveevgfdthefhveetgeegfefftdekvefhveegvdehudenucffohhmrghinhepphhhph drnhgvthdpghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmpd hnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehinhht vghrnhgrlhhssehlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 205FF29C0072; Tue, 11 Mar 2025 17:46:07 -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 Date: Tue, 11 Mar 2025 16:45:46 -0500 To: "php internals" Message-ID: <3e35cd25-c851-4ecc-8a1b-102dadb226e5@app.fastmail.com> In-Reply-To: References: Subject: Re: [PHP-DEV] [RFC] [Discussion] Never parameters Content-Type: text/plain Content-Transfer-Encoding: 7bit From: larry@garfieldtech.com ("Larry Garfield") On Mon, Mar 10, 2025, at 2:05 PM, Daniel Scherzer wrote: > Hi internals, > > I'd like to start discussion on a new RFC about allowing `never` for > parameter types when declaring a method. > > * RFC: https://wiki.php.net/rfc/never-parameters-v2 > * Implementation: https://github.com/php/php-src/pull/18016 > > -Daniel I have a use case for this in Serde, so would be in favor. We should not block this kind of improvement on the hope of generics. Worst case, we have this plus generics so you have options, how terrible. Rust-style associated types would probably work as well. I'd be fine with that approach, too. One could argue they're more valuable as a sort of "junior generics," but absent anyone able and willing to implement them, again, worst-case we end up with options in the future. --Larry Garfield