proposal-call-this icon indicating copy to clipboard operation
proposal-call-this copied to clipboard

Specify how this interacts with the PFA proposal

Open dead-claudia opened this issue 1 year ago • 2 comments

Ref: https://github.com/tc39/proposal-call-this#pfa-syntax

The most obvious syntax I can think of would be receiver~>fn~(). And just in general substituting ~> for any . property access.

dead-claudia avatar Oct 19 '24 08:10 dead-claudia

I agree that call-this syntax and PFA syntax are probably compatible with one another, as in receiver~>fn~().

As you probably know, PFA syntax has faced an uphill battle with the Committee, being seen as too niche for a “heavy” solution like syntax; much of the Committee is also opposed to making point-free / tacit programming in JavaScript more widespread. This proposal has also faced similar headwinds.

It would be cool if we could find a real-life codebase in which call-this syntax and PFA syntax would both be useful—i.e., “why would we want to be able to write receiver~>fn~()”.

js-choi avatar Oct 20 '24 01:10 js-choi

I’ve updayed the original post of tc39/proposal-pipeline-operator#221 with a detailed explanation of the probably insurmountable barriers in the way of PFA syntax proposal and other proposals for tacit programming in core JavaScript.

I’ll keep this issue open, since interactions between the call-this syntax and PFA syntax may still be useful to keep in mind…maybe.

js-choi avatar Apr 28 '25 15:04 js-choi