Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125149 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 96C2E1A00BD for ; Fri, 23 Aug 2024 16:27:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1724430587; bh=IMKRETmUQQMgj1e1/xtBtAdz8P1vao+Ff2YabhIrhgE=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=B3wGP7S36TNhOJ+mPD9Jl7RKleVdW4vTDCxWRHdkjlnvUpZ3J4BQflIaLsQfGA5NE YrcfQSjFBPcvqJ/YvPgV+GrlXEGnDF3vxo7nCuJMr/0HkKSzcXp71rW4MfVaUUqj2r IEoHPPC2DW1VPAUYrE74lVt5nRv/GSGXQ3Z96fSrOs+dnLxZshIM8eejQjNvQRR2SY qzoONI7P562QJbKBHkZSxT6a9HmyQffPhgJEdrBrLQsmUf3CVPY+cMB4N5Un6s0yQC +WMXciJqcLtyIJjDHn3CQQ04LXK3NtmmzNB0Z1g9V7qyj7Id5zBH/N32qH9/gWhkw0 ws+pfsyJUZb9g== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 01EB2180052 for ; Fri, 23 Aug 2024 16:29:46 +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.8 required=5.0 tests=BAYES_50,DMARC_MISSING, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail1.25mail.st (mail1.25mail.st [206.123.115.54]) (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 ; Fri, 23 Aug 2024 16:29:45 +0000 (UTC) Received: from smtpclient.apple (unknown [49.48.221.224]) by mail1.25mail.st (Postfix) with ESMTPSA id 872A2604A3; Fri, 23 Aug 2024 16:27:48 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: [PHP-DEV] [Concept] Flip relative function lookup order (global, then local) In-Reply-To: <63DAE337-B117-4380-8735-186DC30FE0B7@rwec.co.uk> Date: Fri, 23 Aug 2024 23:27:35 +0700 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <68BD8107-9BBE-476B-B085-B340CB709A49@koalephant.com> References: <21D6F160-5EAE-44FA-907B-E1DAAC1B8D75@rwec.co.uk> <53BD062A-4D7F-4E5D-852E-6D27641213A8@koalephant.com> <7607FD64-5572-466E-9866-63C2536B2A09@koalephant.com> <0d269a38-28fe-494c-a903-50022e09f27b@app.fastmail.com> <63DAE337-B117-4380-8735-186DC30FE0B7@rwec.co.uk> To: "Rowan Tommins [IMSoP]" X-Mailer: Apple Mail (2.3776.700.51) From: php-lists@koalephant.com (Stephen Reay) > On 23 Aug 2024, at 22:49, Rowan Tommins [IMSoP] = wrote: >=20 >=20 >=20 > On 23 August 2024 15:04:32 BST, Stephen Reay = wrote: >>=20 >> I stand by the rest of my argument though. This entire ridiculous = discussion about a huge BC break that introduces bizarre = inconsistencies, is 100% because a handful of people don't want to type = `\`. >=20 > Again, I'm not sure which straw man you're attacking. I'm not attacking any straw man. I'm calling out the absolutely = absurdity of breaking code that has worked for 15 years based on the = claim that some people don't want to type a leading backslash. That = isn't *my* claim, that's the claim of the original email. > The largest BC break would be to require users to type the leading = backslash, So don't then. If people want to rely on the exist fallback as it has = existed for 15 years, and don't care about the performance penalty, let = them. > in exchange for removing the current "bizarre inconsistencies" and = making functions resolve the same way as classes. The current inconsistencies between symbol types can be avoided in = userland in a 100% consistent way. Import or qualify the symbols you = use, all the time, and you have 0 inconsistencies or bizarreness in = terms of what it used when.=20 Regardless of the specific flavour, swapping the lookup order for *some* = symbols to look for global symbols when making unqualified references = introduces a hard inconsistency that cannot be rectified in userland, = and some flavours (i.e. the original proposal) introduce ongoing-forever = BC breakage issues. > Other proposals aim to shift that balance - leaving some = inconsistency, but less compatibility break. Great, how about the solution that doesn't have any BC, and works in = every version back to 5.3? >=20 > And most users don't object to using a leading backslash Once again, I didn't claim most users object. I was specifically = pointing out that a small number of people complaining about this is a = ridiculous reason to even consider the change. Hell the original issue = that Ilija referenced makes this outrageous claim, so perhaps direct = your "most users" response at the person claiming to represent the views = of *all* users on the planet: > All PHP projects in the World are a bit slower than they could be... > , they just (quite reasonably) have no idea what impact it has on the = ability of the engine to optimise their code. Great, so then we can resolve this whole thing by adding a footnote to = the "Name resolution rules" page in the manual that (a) recommends using = qualified names (i.e. prefix with a `\`) and (b) provides deeper details = of the reasons for those who care. >=20 > Regards, > Rowan Tommins > [IMSoP] >=20