Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112134 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 11416 invoked from network); 28 Oct 2020 17:24:33 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 28 Oct 2020 17:24:33 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 20FEA1804CC for ; Wed, 28 Oct 2020 09:43:30 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 28 Oct 2020 09:43:29 -0700 (PDT) Received: by mail-wm1-f53.google.com with SMTP id a72so189724wme.5 for ; Wed, 28 Oct 2020 09:43:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=9Vb0ySVJMPG5NInSGRkCPNfZtrL1C4AcJEE6i2Mqd90=; b=Vc/y895f+Sfkay+UUBEh0ODuyaJgrw3r0Kan0iHiCdMLbPDHb17cgagCBRYwhV2IeC TdyQ6jwQoSgvVGFbsbtrI2BiggkNxxGvwUwJoyJIByw/84kLkdxo6LwWGSBKtTZXdDZT Uym/8dpPDogd4N6G0l2OJzybI08q7oBe8S1L04CHWjkre81+YjA0CopmSWhxhRJv4bQW pMcj5YRHHSBuv3+HMWQ65w/ofX+VMKw5JptRJ2RSJ2KUt84Dy+E49LhDKTCpMsSZKvx5 d4ffCFoQjZZjU3Wky7yh1Z/Iq+aK8RFSh13sKQ9G6vNlDeC8h1p3N7EqWTjIh7CaUwpo M/Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=9Vb0ySVJMPG5NInSGRkCPNfZtrL1C4AcJEE6i2Mqd90=; b=FFyJiLn5i2+tXak/zGr0LXtMZVx4WIy8UyI37R2bz+ivQhim6Il39gyQ63Hpzi3qkz txYI2vL3N//FHpw3LHKWamBiVU6zCM0c653UTKueVb4/qkJf+oud5Z/pVEb+08YQlqR9 m2gdyb9p4w2Ndm6xVbG6TjD1IqNxdwfzBGS6RxvH3WZ9ApnqFBTiVv8XGb66Kjm+YjiF dPaGPwfE7QcJYre7p8fF/ZkeYl7vxTqbsK+7FYhAZEb0W+VjeIYLTjT8Q86PgIu0ttcd L1YP3SuLF6hz4owoI25Z0+k3hLHN6wKEKgFqt2RCOc+B/KRhnbJuJjtJnxlM9PlJr7+p E8Xw== X-Gm-Message-State: AOAM533i7OUpIULcUVSSj1X5htY8SeCiI4HVusTheCIeBOCUjwzvAgWv ifIoMcfHQnq7XHlJqlHM32GoWyoDw3w= X-Google-Smtp-Source: ABdhPJyhpbAStjfPM1H9I5VztZnu+sB+7jno0tw2fQ8P6Sxf51ljBH/vEjc/hJKFAwKOOhXa/j24WA== X-Received: by 2002:a1c:7213:: with SMTP id n19mr298858wmc.188.1603903407243; Wed, 28 Oct 2020 09:43:27 -0700 (PDT) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id 24sm229599wmg.8.2020.10.28.09.43.26 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Oct 2020 09:43:26 -0700 (PDT) To: internals@lists.php.net References: <893315378549048c16f2dc212bdec698fe32f8d10d37f9c5f74ffd179a1e0de9@mahalux.com> <73716a39-53ac-c9b4-a38a-86922a2edeb2@gmail.com> <275e0bd6800960e9f73f240cb95a6c5ae5059f3212285bf75a473260c0bce35f@mahalux.com> Message-ID: <5e6301c6-5ee0-5c9f-eee8-4d40fbb0276c@gmail.com> Date: Wed, 28 Oct 2020 16:43:25 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: <275e0bd6800960e9f73f240cb95a6c5ae5059f3212285bf75a473260c0bce35f@mahalux.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB Subject: Re: [PHP-DEV] Bug #80248 - Swapping parameter names during inheritance does not throw From: rowan.collins@gmail.com (Rowan Tommins) On 28/10/2020 15:14, Michael Voříšek - ČVUT FEL wrote: > I agree - "it's harder to imagine a scenario in real life where". > [...] > If we can agree, that implementation is not guaranteed to be called with > named parameters only, what real world usecase to defend this current > php behaviour is left? You're thinking about this the wrong way around: the simplest implementation is to detect non-existent named parameters (which happens to include renamed parameters) at run-time; it is additional checks on top of that which need to be justified. Other approaches to the problem require at least one of: * Significant additional code in the engine to perform additional checks and/or name aliasing * Users to change existing code which works correctly, but would theoretically break if used with named parameters The advantages are almost entirely theoretical, with few realistic examples. So the "pragmatic approach" the RFC refers to concludes that the benefit of additional analysis does not outweigh its cost. Regards, -- Rowan Tommins (né Collins) [IMSoP]