On Tue, Jun 29, 2021, at 12:30 PM, Guilliam Xavier wrote: > (Extracted from the "Pipe Operator, take 2" thread) > > On Tue, Jun 29, 2021 at 12:54 AM Larry Garfield <la...@garfieldtech.com> > wrote: > > > On Mon, Jun 28, 2021, at 5:30 PM, Olle Härstedt wrote: > > > > > Would a slimmed down version have more support? How about removing the > > > variadic operator, and let the user manually add the lambda for those > > > cases? > > > > I talked with Joe about this, and the answer is no. Most of the > > complexity comes from the initial "this is a function call, oops no, it's a > > partial call so we switch to doing that instead", which ends up interacting > > with the engine in a lot of different places. > > > > Are you saying that the implementation complexity is mainly due to chosing > a syntax that looks like a function call? > If yes, is it also the case for the "First-class callable syntax" RFC? > And does it mean that a different syntax (e.g. with a prefix operator) > would result in a simpler implementation?
>From what I understand from Joe, most of the complexity comes from producing >something that isn't a closure but shares the same interface as a closure (at >least that's what it would be in PHP terms), which then requires lots of >special handling throughout the engine. I don't fully understand it all >myself, TBH. I've been pondering if a completely different approach with a prefix symbol would be able to be less complex, and the simple answer is I have absolutely no idea. But we are running low on symbols... --Larry Garfield -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php