Re: [RFC] Scope

From: Date: Sun, 01 Nov 2026 14:26:40 +0000
Subject: Re: [RFC] Scope
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-132983@lists.php.net to get a copy of this message
On 26/10/2026 16:03, Frode Børli wrote:
Hi internals, I'd like to start the discussion on a new RFC: https://wiki.php.net/rfc/scope <https://wiki.php.net/rfc/scope>
Hi Frode, I'm really happy to see this as an independent, focussed, RFC, which can hopefully fit well with the other async-related proposals being worked on. In early versions of the "True Async" RFC, Edmond Dantes included a complex API for attaching data to coroutine scopes, and I argued at the time that it could be simplified, and more complex structures built on top of it later. It looks like that's exactly the approach taken here, providing only the parts that are essentially impossible in userland. I do share Larry's concern that some of the common patterns using WeakMap will be hard to get right, but maybe that can be solved by additional helper classes and functions which might have other uses anyway? The only slightly trivial reaction I had was to the name: variable scope is something we talk about so often, that I can see "variables tied to the current Scope" confusing people. Naming things is notoriously hard, but I note that a lot of the other languages you reference use the word "context" instead, and wonder if you'd considered that? Thanks, -- Rowan Tommins [IMSoP]

« previous php.internals (#132983) next »