Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125073 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 90B511A00BD for ; Tue, 20 Aug 2024 16:08:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1724170193; bh=SzW2osgHxkz4sGwfraeKy3S9nrNOICDFYzDhDEqUeXw=; h=Date:From:To:In-Reply-To:References:Subject:From; b=a1TPBv53m0cGT41dh8lLuzbfOqXzzdY7xn6792mjdAVm3hLi6PqojQhtfMKiPnAHp h3tbl4y6l4VKmQYhWBytRAKVHjpq7r2ZGDNreM/bRcpwDO6h3plqyGPMsXE2VkozuU O4AjD7go3fnomxHsYxAguTmKuFcmMg57DFw5UhZMLsUU1Eqy8peSBQt73t7Yl+iXYG naYCyc6aBor0N52Jl3D3gQmTGYV84Zm+/3JmM0gnbxTu4YqOTrgwTyr6Q1eC/GTFYd kGf75vr5yPFLHAxyZAlu7SyAsQFS/Ql2pCxo58/5D7FnVYg2X3ROJRwd5c4Pqdor+A Lbu+ra81tdXvQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9ACF818007A for ; Tue, 20 Aug 2024 16:09:52 +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 fout6-smtp.messagingengine.com (fout6-smtp.messagingengine.com [103.168.172.149]) (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 ; Tue, 20 Aug 2024 16:09:52 +0000 (UTC) Received: from phl-compute-02.internal (phl-compute-02.nyi.internal [10.202.2.42]) by mailfout.nyi.internal (Postfix) with ESMTP id 4782E13854B6 for ; Tue, 20 Aug 2024 12:08:02 -0400 (EDT) Received: from phl-imap-09 ([10.202.2.99]) by phl-compute-02.internal (MEProxy); Tue, 20 Aug 2024 12:08:02 -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=1724170082; x=1724256482; bh=a88hDJ4jMw okf4aJXux+HN8wMV2uXHIs6syRhiaFVJc=; b=asz/FqfmuS69CFBOzXjQNOPPO8 267dxgxUd41Z5gMdudCZ/rlEUsUCmB7TUvuhCfCsfYF1wHbQG+lISNKzt77WTcc+ UgLXxEVCBnuVuC9YN5U0gQzr0NnbRVsfYXM/6k80vwvQAN/PHSya5mzZoeERW5mq 3Cou1IoBXL0OXCezuF2CVSgwxOWtVdOVa/YiPxgHiKi4rMsSPQhDmG+ePdVkZLgq aGJZNzJp4Wm9GkH0UkS2TbsfEg9pnoUXyLmsgInbVVZmw+zndmoiAFHhstRo73A5 Cms5Cfz3jdU6OKpy8irO4jInPSSXsjNSOJheoE7mheMtTjvT9UGhSIwvLiGQ== 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=1724170082; x=1724256482; bh=a88hDJ4jMwokf4aJXux+HN8wMV2u XHIs6syRhiaFVJc=; b=cHvmBQgnMOiN+kspOXXqlAHGVE4HyUbgx+XI9ByQu3F3 rXzlikqcIYmHZTcnZ/LcHIYBJRyrwFSwRbQfwRpKGS9U5Xh80rVzd/+hF4YriCCS CxZVe/80bzjxsQteDEntUSNf1ruNMmY+hVSGzW2qJWaperokLJzK/V5euurfsBJy mCbh38MvwPgr5tPRgXoAHsYWW6w8F92YBPItRjg4MjY1MCVc9L1aO0YBxHU0Q5Ex bMFbpCY3K8t6l1HreH4Yd7LYjLqN7ZamX/XN1P4ulX/D8x5l1vjddxucwiGDyysm SYQ0hB++vaxDcZrynC010nLYAZl7t1mzJtqMZcGGcQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudduiedgleehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefoggffhf fvkfgjfhfutgesrgdtreerredtjeenucfhrhhomhepfdftohgsucfnrghnuggvrhhsfdcu oehrohgssegsohhtthhlvggurdgtohguvghsqeenucggtffrrghtthgvrhhnpedtueejtd ethfeulefhtdelieduteelffdtudelheffgedtieehhfelieejgfevgeenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrohgssegsohhtthhlvg gurdgtohguvghspdhnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgt phhtthhopehinhhtvghrnhgrlhhssehlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id CC87315A005E; Tue, 20 Aug 2024 12:08:01 -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: Tue, 20 Aug 2024 18:07:41 +0200 To: internals@lists.php.net Message-ID: <00ee5318-329c-4a85-a2cd-1fc7050103ba@app.fastmail.com> In-Reply-To: <1E9FCFA6-4FAD-4F47-9FC6-6AA8F2FD6BBF@rwec.co.uk> References: <2716f729-4008-4f75-8412-861d8960b746@app.fastmail.com> <26338153-6d16-456a-81bf-8231bdaf1b79@app.fastmail.com> <6197f6e1-d123-41e1-87c8-887c6508bfa2@rwec.co.uk> <97d993ee-c558-43a1-a36a-8e06aa2d829a@app.fastmail.com> <1E9FCFA6-4FAD-4F47-9FC6-6AA8F2FD6BBF@rwec.co.uk> Subject: Re: [PHP-DEV] function autoloading v4 RFC Content-Type: multipart/alternative; boundary=198ba4175bc34c45849ffc0a65d57e01 From: rob@bottled.codes ("Rob Landers") --198ba4175bc34c45849ffc0a65d57e01 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue, Aug 20, 2024, at 08:50, Rowan Tommins [IMSoP] wrote: >=20 >=20 > On 20 August 2024 00:21:22 BST, Rob Landers wrote: > > > >I assume you are worried about something like this passing test? > > > >--TEST-- > >show called only once > >--FILE-- > > > > >namespace test; > > > >spl_autoload_register(function($name) { > > echo "name=3D$name\n"; > >}, true, false, SPL_AUTOLOAD_FUNCTION); > > > >echo strlen('foo'); > >echo strlen('bar'); > >echo strlen('baz'); > >?> > >--EXPECT-- > >name=3Dtest\strlen > >333 > > > >In my RFC, I mention it is called exactly once. >=20 >=20 > I haven't looked at the PR, only the RFC, and I did not see this very = important detail explained anywhere. The only thing I can see is this ra= ther ambiguous sentence: >=20 > > The function autoloader will not be called again.=20 >=20 > That could mean not called again for the current call (compared with p= roposals that call it a second time with the unequalled name); it could = mean not called again for the current line of code (based on the current= caching behaviour); or never called again for that combination of names= pace and name; or possibly, never called again for that combination of n= amespace, name, and callback function. >=20 > That's not a small detail of the implementation, it's a really fundame= ntal difference from previous proposals.=20 >=20 > So I would like to repeat my first response to your RFC: that it shoul= d sound more time explaining your approach to the multiple lookup proble= m. >=20 > Regards, > Rowan Tommins > [IMSoP] >=20 Thanks Rowan, That's a fair critique. I expect some of the wording will be more clear once I write out the doc= umentation -- even if it isn't used directly, I tend to write out docume= ntation to force myself to reconcile the code with the plan, find logic = bugs, perform larger scale tests, and create tests to verify assertions = in the documentation. From there, I'll update the plan or code to get ev= erything to match and spend some time on clarity. It's the hardest part,= IMHO, as it requires diligently ensuring everything is correct. In othe= r words, writing the documentation makes it feel like a "real thing" and= it triggers what small amount of perfectionism I have. =E2=80=94 Rob --198ba4175bc34c45849ffc0a65d57e01 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable