Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125120 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 B70781A00CA for ; Fri, 23 Aug 2024 10:29:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1724409109; bh=wCajK18/OqhCLFP3Mil8EaWpvRV5W/54esyt2w4BQTU=; h=Date:From:To:In-Reply-To:References:Subject:From; b=XLwqAkFJbNjtcGm5lKnlu+G31gHbmX/ZF3w2c96ZlpaveD8dAq36HCwcHRSc/G4sw 3J6aKrFypnEsx2Lifpq1gngfcdHz0fnQud5+ivTHRpg44plz4mweCN5rNaKmbmTclB T2owc+rXvbUGIFDbklGFjSxi1rZZef92UvsO3AWkPgGTozsiA8Veil0YtVC+W4zm4+ HRRNy+dulYKCUbtPk2JUEQo2AiEiLJiFMXUrQEboeR6zRcDn+iW6natWzOG0o2WAke LeIaJz4VwlQuMXaxmgzwQD3fXRSjXkc05I7igQVMjMb94tz6ihZ/UFBGugM5isGQ0J HfMWqGxU6dkRA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 583F91801ED for ; Fri, 23 Aug 2024 10:31:47 +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.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fout8-smtp.messagingengine.com (fout8-smtp.messagingengine.com [103.168.172.151]) (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, 23 Aug 2024 10:31:45 +0000 (UTC) Received: from phl-compute-03.internal (phl-compute-03.nyi.internal [10.202.2.43]) by mailfout.nyi.internal (Postfix) with ESMTP id E98E6138FF5F for ; Fri, 23 Aug 2024 06:29:53 -0400 (EDT) Received: from phl-imap-10 ([10.202.2.85]) by phl-compute-03.internal (MEProxy); Fri, 23 Aug 2024 06:29:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rwec.co.uk; 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=1724408993; x=1724495393; bh=qlkL31ngOfv2SUySzAeTWrShywigmmxsgBLoweVe9qc=; b= Rur8nyo9tdXhLdE5sCx/Jpwd/HgZP6uPqgDphVXLZBNmrnv/uR0cL6Ea8MAY3ALo V+Yt1OPUSfCecvIVgpDD+9eDboOpRRz4osgc7MYtLiKY8yBMp1r9zVWaj33TSTcA +5FeWZU/p4V0nS6ksAZJarN9L2GftKvRsgO0m9hjLFymt99UxQge2AJUXYQ1qVtH GV/mT+7b23IqssLfF7UkYvWPZCs4AiM8+5PaeojPKNKfh4JeX8aHYIwryloE1JgJ qT+XSHHWMdRp4AJwQ0LDHuCNjTVhuoOFggkI6mqnmPvD/9d1o/WYJ+0n/ROMIjY3 QHIvA8WaSJe3Cfuf2AGRwQ== 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-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1724408993; x= 1724495393; bh=qlkL31ngOfv2SUySzAeTWrShywigmmxsgBLoweVe9qc=; b=e iHUSxx6oVSIPEaxf1motKeltUaE5HKDj8CtxJqZxrH2S/sRlzGyS6S4EuiqO+EOM aKji5+JkzA4TLG/Tg42U/8MUy+MFyN7m7yYsoMKAwC3rJmn+K0dJr+jrkBvJ2uwY WBoJ+7wVM3trA7eijeoHZmkEgHa7FMm9ZHKrfrozPUa1kUTYXw7tGtCi0Rkb5F4G AaNEpc/htCNvi0ZsBd1lDzP2aVLSmstFDImWMypozYYK3FaFOcQBGteo9TNO49ep oVQOX2QXP5B1v5k3uNoAc3trBGLBJrr77hmkzLE0zB4pPsnSovMZw+FlSBaYjWm6 zYoc7634ygAbyUQl46DOA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddruddvvddgvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefoggffhf fvkfgjfhfutgfgsehtjeertdertddtnecuhfhrohhmpedftfhofigrnhcuvfhomhhmihhn shculgfkoffuohfrngdfuceoihhmshhophdrphhhphesrhifvggtrdgtohdruhhkqeenuc ggtffrrghtthgvrhhnpeevjefgvdehffeuudelgfeutdehteefhedtffdthfetvedulefg ueeiteelffeuvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehimhhsohhprdhphhhpsehrfigvtgdrtghordhukhdpnhgspghrtghpthhtohep uddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepihhnthgvrhhnrghlsheslhhish htshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id AB36D3C0065; Fri, 23 Aug 2024 06:29:53 -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: Fri, 23 Aug 2024 11:29:32 +0100 To: internals@lists.php.net Message-ID: In-Reply-To: <53BD062A-4D7F-4E5D-852E-6D27641213A8@koalephant.com> References: <21D6F160-5EAE-44FA-907B-E1DAAC1B8D75@rwec.co.uk> <53BD062A-4D7F-4E5D-852E-6D27641213A8@koalephant.com> Subject: Re: [PHP-DEV] [Concept] Flip relative function lookup order (global, then local) Content-Type: text/plain Content-Transfer-Encoding: 7bit From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") On Fri, 23 Aug 2024, at 10:58, Stephen Reay wrote: > Making relative function names do the opposite of relative class names > sounds like a great way to permanently kill any prospects of > encouraging developers to use regular namespaced functions in place of > static classes as "bag of functions", which is what we keep hearing we > should use - most notably on a recent RFC to embody the concept of a > static class. That's why I brought up the point about making it easy to explicitly say "relative to current", just as you can explicitly say "relative to global" with a single "\". It's also worth remembering that this whole discussion has no effect on using functions that are defined in a *different* namespace. The below code might benefit from function autoloading, but would not be helped, hurt, or changed in any way by any of the proposals in this thread: namespace Acme\Foo\Controller; use function Acme\StringUtils\better_strlen; use Acme\StandardUtils as Std; $foo = Std\generate_something(); $len = better_strlen($foo); \Acme\Debug\out($len); Regards, -- Rowan Tommins [IMSoP]