Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125119 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 B37311A00BD for ; Fri, 23 Aug 2024 10:27:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1724408975; bh=a0loaiwZEK915OX0wG0jT9PvLGUGyVZOzRx+cnjG2VM=; h=Date:From:To:In-Reply-To:References:Subject:From; b=jNJlx5wSi7URLAKqWYlzGMKxkwn1B89roi9JFJz7v3MZ7vngGHcIeGuyK3RerCAWL RXVfYsKtJL7o6/iIyMXyNsCYMZsapmsjhwjF47alLVa1lupdx/R9HRPQ9VZAkXrzlQ 8DMpuTLIvTID33BnUDvG7vYbak2c7RCFqiHKsHftjVRW5wFojy2C4QBFZpI4txKCtV 3EGabEr3/zwKltEz2QOfOyI50lvs7K0TGO+Yw1OqBwd5BcJnHe7HSKOkwPnN0WSGBV IyaI9Bb3VirGgbK770veriPVbPwunuXB3uEutBIwE18h1/wTzJAFX9wuCfooHGHI9l GeCpTSHXyo3gQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 44C4018006F for ; Fri, 23 Aug 2024 10:29:34 +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,HTML_MESSAGE, 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 fhigh3-smtp.messagingengine.com (fhigh3-smtp.messagingengine.com [103.168.172.154]) (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:29:33 +0000 (UTC) Received: from phl-compute-03.internal (phl-compute-03.nyi.internal [10.202.2.43]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 52DFA1151B3D for ; Fri, 23 Aug 2024 06:27:42 -0400 (EDT) Received: from phl-imap-09 ([10.202.2.99]) by phl-compute-03.internal (MEProxy); Fri, 23 Aug 2024 06:27:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc: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=fm2; t=1724408862; x=1724495262; bh=a0loaiwZEK 915OX0wG0jT9PvLGUGyVZOzRx+cnjG2VM=; b=K51Am8B/bpaMsQt4LIgLMU8HpD O/KEqFytMpRM5+6lLxKBItZwFaw7pwAcKO5OCdv63w3U0mBUhpze1uxgwhrU5NMG X0txfaRnw/+IyHs3JyG+pQMlfWPneKgbOH9aP0V3BsxWZ0JUpVK/TWWtgEfJ7MBK ZlT5zRqzqcezAiiKxcP8+oe6PRjvtfdUxjUAYdHe5aYzmEFzl1ODDixIqOnczaw9 2x+Enhum7QEZBIK8qIUgy55VNROihOmn6N9gaJ45lb6n+7JiEAWHQ0+3aZvz45oY VHr9Bpsc4vIjphTp47TlOQ8v2rsIf6CpTdanUO3+7TNp0MFGKw43c72m2+Mg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=1724408862; x=1724495262; bh=a0loaiwZEK915OX0wG0jT9PvLGUG yVZOzRx+cnjG2VM=; b=axwfbMVxncb/i0yHNe+BwDydZ458gIUE25L0KdL7dJp7 zvkYO/ivnhGHchzoJtFOoXToU/EYwsW980b4J25mAr/QaXJKs6M7dAn9fdVhpRVu W44wf7hSyTLvnN4SleHJ/dQVeIreLChRGqagYsmgjcPy9CHU08pbxgphtxZgV7Hh gf94F++6hN2TUnXPi1dr4JPNhK4Um0YXnHqOpEzT8UlVpoh0KdqIR6VTPES1EJHM rlQMzIJ9nRJz4UZc1YIcueHhgUrqHk/TH67Ad5XNCKNqkFTfv1+/2nZXSxzhnH2W 65qre4+bY1bcvhfCVgIpKf2jB4UgYcRVnr3g3vMAjw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddruddvvddgvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefoggffhf fvkfgjfhfutgesrgdtreerredtjeenucfhrhhomhepfdftohgsucfnrghnuggvrhhsfdcu oehrohgssegsohhtthhlvggurdgtohguvghsqeenucggtffrrghtthgvrhhnpeelkeehtd fgfefhleeilefggeeihfekvdelfeejtdfflefhheehfffgudetuddutdenucffohhmrghi nhepphhhphdrnhgvthenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehrohgssegsohhtthhlvggurdgtohguvghspdhnsggprhgtphhtthhopedu pdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehinhhtvghrnhgrlhhssehlihhsth hsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 02AA3780065; Fri, 23 Aug 2024 06:27:41 -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 12:27:21 +0200 To: internals@lists.php.net Message-ID: In-Reply-To: <63F3CFAA-0D9A-4323-A1A4-0E3544281ECE@cschneid.com> References: <846D7756-712B-4A7C-9FC6-DB9F858836B8@rwec.co.uk> <880ffc27dc9b421407a670c75d5f5ba756870396.camel@ageofdream.com> <790534cd-e158-4712-878c-642dfd0e2bad@app.fastmail.com> <63F3CFAA-0D9A-4323-A1A4-0E3544281ECE@cschneid.com> Subject: Re: [PHP-DEV] [Concept] Flip relative function lookup order (global, then local) Content-Type: multipart/alternative; boundary=9236d0a6527b4cd3867034b5c7dc0a4a From: rob@bottled.codes ("Rob Landers") --9236d0a6527b4cd3867034b5c7dc0a4a Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, Aug 23, 2024, at 12:14, Christian Schneider wrote: > Am 23.08.2024 um 11:34 schrieb Nick Lockheart : > > I think we are all trying to achieve the same thing here. >=20 > I'm not sure who "we" and what "same thing" here exactly is. >=20 > I recall the following arguments for changing the current situation ab= out function look ups: > - Performance > - Function autoloading > - Consistency >=20 > Did I miss something big? Nick was replying to me :p, judging by the quoted paragraph. >=20 > First of all I don't think the performance argument holds enough weigh= t as I'm very doubtful this impacts performance of a real world applicat= ion in a significant way. And for people *really* hitting this problem t= here is a solution already. > Secondly I am a bit confused about the whole function autoloading disc= ussion: There is already a good-enough mechanism (putting them as static= functions inside a tool class). I just don't consider the hoops we have= to jump through to get a more "pure" or fine-grained solution for a spe= cial problem not worth it. As for the "don't use classes for static func= tions" I've yet to see a good argument apart from personal preference. > As far as consistency goes I've yet to encounter someone being confuse= d about function resolution. But then again I'm not reaching namespaces = for PHP classes. As far as function overloading goes, I recommend checking out a draft RF= C I've been working on a very, very long time: https://wiki.php.net/rfc/= records. In some off-list discussions, it was clear that if I wanted thi= s syntax, I would need to pursue function autoloading. Further, function= autoloading is a clearly missing feature that would be useful in many s= ituations. If function autoloading doesn't work out, I will need to take= a different approach to that syntax (which is fine, but not something I= want because I chose the syntax for a very good reason). That being sai= d, I'm not ready to discuss records here, so this is the first and last = time I'll mention it on the thread. There is a Reddit post in r/php and = a GitHub repo if you are interested in discussing records. There are ver= y many things to work out still, and it is very much work-in-progress. >=20 > While modern tooling possibly can adapt source code to the new style e= fficiently I have to maintain too many installations of PHP projects on = various hosters to looking forward to that. And the argument that "you c= an just stay on an old PHP version" is just not a feasible solution eith= er.. >=20 > Maybe we should take a step back and reevaluate the pros and cons.=20 >=20 > - Chris >=20 =E2=80=94 Rob --9236d0a6527b4cd3867034b5c7dc0a4a Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Fri, Aug 23,= 2024, at 12:14, Christian Schneider wrote:
Am 23.08.2024 um 11:34 schrieb Nick Loc= kheart <lists@ageofdream.com<= /a>>:






First of all= I don't think the performance argument holds enough weight as I'm very = doubtful this impacts performance of a real world application in a signi= ficant way. And for people *really* hitting this problem there is a solu= tion already.
Secondly I am a bit confused about the whole= function autoloading discussion: There is already a good-enough mechani= sm (putting them as static functions inside a tool class). I just don't = consider the hoops we have to jump through to get a more "pure" or fine-= grained solution for a special problem not worth it. As for the "don't u= se classes for static functions" I've yet to see a good argument apart f= rom personal preference.
As far as consistency goes I've y= et to encounter someone being confused about function resolution. But th= en again I'm not reaching namespaces for PHP classes.

As far as function overloading goes, I recommend= checking out a draft RFC I've been working on a very, very long time:&n= bsp;https://wiki.php.net/rf= c/records. In some off-list discussions, it was clear that if I want= ed this syntax, I would need to pursue function autoloading. Further, fu= nction autoloading is a clearly missing feature that would be useful in = many situations. If function autoloading doesn't work out, I will need t= o take a different approach to that syntax (which is fine, but not somet= hing I want because I chose the syntax for a very good reason). That bei= ng said, I'm not ready to discuss records here, so this is the first and= last time I'll mention it on the thread. There is a Reddit post in r/ph= p and a GitHub repo if you are interested in discussing records. There a= re very many things to work out still, and it is very much work-in-progr= ess.


While modern tooling possibly can adapt source co= de to the new style efficiently I have to maintain too many installation= s of PHP projects on various hosters to looking forward to that. And the= argument that "you can just stay on an old PHP version" is just not a f= easible solution either..

Maybe we should t= ake a step back and reevaluate the pros and cons. 
- Chris


=E2=80=94 Rob
--9236d0a6527b4cd3867034b5c7dc0a4a--