Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112130 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 78412 invoked from network); 28 Oct 2020 11:26:56 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 28 Oct 2020 11:26:56 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 45F7F1804C3 for ; Wed, 28 Oct 2020 03:45:49 -0700 (PDT) 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.9 required=5.0 tests=BAYES_00,HTML_MESSAGE, SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-mahalux.mvorisek.com (mail-mahalux.mvorisek.com [77.93.195.127]) (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, 28 Oct 2020 03:45:47 -0700 (PDT) Received: from 379e8b26482a (10.228.0.250) by mail-mahalux.mvorisek.com (10.228.0.4) with Microsoft SMTP Server (TLS); Wed, 28 Oct 2020 11:45:45 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_1af20070aa3d2962104178f53205e90f" Date: Wed, 28 Oct 2020 11:45:44 +0100 To: internals@lists.php.net In-Reply-To: References: Message-ID: <893315378549048c16f2dc212bdec698fe32f8d10d37f9c5f74ffd179a1e0de9@mahalux.com> X-Mailer: SAP NetWeaver 7.03 Subject: Re: [PHP-DEV] Bug #80248 - Swapping parameter names during inheritance does not throw From: vorismi3@fel.cvut.cz (=?UTF-8?Q?Michael_Vo=C5=99=C3=AD=C5=A1ek_-_=C4=8CVUT_FEL?=) --=_1af20070aa3d2962104178f53205e90f Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8; format=flowed I see, guys, what is the single reason to allowing this dangerous inheritance? https://3v4l.org/X8omS parameters renamed, result with named parameters is different https://3v4l.org/kgHWf renamed parameter, call with named parameters does not succeed at all (which violated basic principe of OOP inheritance at least) With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem, Michael Voříšek On 26 Oct 2020 15:36, Rowan Tommins wrote: > On 26/10/2020 13:12, Michael Voříšek - ČVUT FEL wrote: > >> I am writing regarding bug 80248. >> Currently, PHP 8 allows parameter reuse at different position, which I >> belive is very dangerous, as passed parameters may be passed in a >> different order with different object impl. > > Hi Michael, > > Yes, this was one of the most discussed aspects of named parameters. There were a few proposals for how it should work, but in the end none of them gained consensus, and Nikita decided to keep things simple. > > I suggest having a look at the RFC [https://wiki.php.net/rfc/named_params] and its main discussion thread [https://externals.io/message/110004] to see the pros and cons of various alternatives. > > Since none of these were adopted in the proposal, it's not clear that this could be considered a bug, rather than a feature change, so there'd need to be a very strong justification for re-visiting it this close to 8.0 availability. > > Regards, > > -- > Rowan Tommins (né Collins) > [IMSoP] --=_1af20070aa3d2962104178f53205e90f--