Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126902 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 8F5D11A00BC for ; Fri, 21 Mar 2025 20:41:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1742589554; bh=N+096HyTgiHk+t9xt4Eqff5/PF30rRR0PThFv1H25AQ=; h=Date:To:From:Cc:Subject:In-Reply-To:References:From; b=hacQ5uhfB9nqxUrXo37rOWUvG5I+xcsC0yqwM/Q2ljV4yhkTAEgKrA7mGGXSacWhZ 6oXQYOdACAiIlwBwJYBZZvsdFGDDLnEpltcMuwmqBodoN21q86/NfCjF1A3wjJoqjp eYC/NGgo6KwonbnfqSG8np1o0aUIfymBJupgCsC9BSWf8n0NnjGLIxWQenhy0z3tHS JQVHyzF5rbZoWzo66Vs6w6/qwIC9Sc6S8cgWSbBruiVzfms2LXrP+1TqC6bDdwAZZL 5VL3LVafo7+TR7O67w2XML+08y4QqGrtHLAJP3r/ggRidh8viGFeds6gbcKIPDvcsJ Mfl1oaNxaPmbg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DDCF4180053 for ; Fri, 21 Mar 2025 20:39:12 +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=-0.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-4323.protonmail.ch (mail-4323.protonmail.ch [185.70.43.23]) (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 ; Fri, 21 Mar 2025 20:39:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gpb.moe; s=protonmail3; t=1742589700; x=1742848900; bh=wr9eNPNfzB6NMe4VerNqg2dBSjVjvxQ8e59FqqAKBLA=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=HTXHpJ0vtAHMMs/3VltzDkPFRrQve+24pw/cJ+IaqCL+aOg+mww0VxOWrV1u/pZuP c1ynom2whkdF1Aktwx3isY9jM48EbeltJwZQmGoI4IpCNxPTcZXO9fv+tb6T2XuIFW dbpciBPUpEXokj67JwLOkpqZ9bsVjC6GOO9d+ujSbVLmh7gTScjmUIrfDHFCjHbFWI CV75nkW7woL1NgLJ8T/yIhwTaoqQ72ap2spE1XFJxnVh6AuKkm+tDJc+IhyHKhWv9A xf7KVEWD0SYnbMFgTycIej8JDVhVTP/UJnW6oWci09ajNF6l5WOtYWuuiMoGS1o0GX /6Eyw23nwlVRg== Date: Fri, 21 Mar 2025 20:41:36 +0000 To: Larry Garfield Cc: php internals Subject: Re: [PHP-DEV] [RFC] [Discussion] Never parameters Message-ID: In-Reply-To: References: <3e35cd25-c851-4ecc-8a1b-102dadb226e5@app.fastmail.com> Feedback-ID: 96993444:user:proton X-Pm-Message-ID: fd04d61433c7fe6910ceb7acc6968814f0b7e72b Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: internals@gpb.moe ("Gina P. Banyard") On Thursday, 20 March 2025 at 16:57, Larry Garfield wrote: > On Thu, Mar 20, 2025, at 11:24 AM, Gina P. Banyard wrote: >=20 > > 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. >=20 >=20 > To clarify, you're saying this: >=20 > [...] > > Am I following that? Because just from writing that I am not sure I agree= , which means I may be misunderstanding. :-) I am saying: interface I { pubic function foo(never $a); } can ***not*** be "upgraded" to interface I { pubic function foo(A $a); } whereas it is possible to go from interface I { pubic function foo(mixed $a); } to interface I { pubic function foo(A $a); } The implementing classes are completely irrelevant in this context. Best regards, Gina P. Banyard