Re: Brainstorming idea: inline syntax for lexical (captured) variables

From: Date: Tue, 14 Mar 2023 23:32:49 +0000
Subject: Re: Brainstorming idea: inline syntax for lexical (captured) variables
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-119703@lists.php.net to get a copy of this message
On Tue, Mar 14, 2023 at 7:09 PM Rowan Tommins <rowan.collins@gmail.com> wrote: > Outside of > those cases, though, there's no reason it should mean anything, just as > $this->foo or self::$foo doesn't mean anything outside a class. In fact, > it could be spelled capture::$foo or $scope->foo rather than just using > new punctuation, if we wanted to encourage that analogy. Would this be allowed in files included in the methods of the anonymous class? $this-> and self:: is, and it's a pain point for static analyzers, forcing us to invent things like @psalm-scope-this -- Best regards, Bruce Weirdan mailto:weirdan@gmail.com

« previous php.internals (#119703) next »