tc39 / proposal-pipeline-operator

A proposal for adding a useful pipe operator to JavaScript.
http://tc39.github.io/proposal-pipeline-operator/
BSD 3-Clause "New" or "Revised" License
7.52k stars 108 forks source link

Official changes thread #232

Open js-choi opened 3 years ago

js-choi commented 3 years ago

This is an official announcement thread for significant changes to the proposal’s explainer or spec. These will include things like:

If you'd like to be informed only about significant changes, subscribe to this thread rather than the repository. :)

js-choi commented 2 years ago

I’ve temporarily switched the topic token back from ^ to # (see #250). As per https://github.com/tc39/proposal-pipeline-operator/issues/91#issuecomment-926357211, I think my change of the spec from % to ^ was premature, partially because I now mildly prefer % again, but mostly because it’s what we presented to plenary on August and because it’s what Babel currently supports (see babel/babel#13749).

This is a tentative change and has no bearing on what the actual final topic token will be. It’s just a swap to the explainer and spec back to what we presented to the Committee plenary on August.

This will be almost certainly be the last time I switch the topic token until we hold our TC39 incubator sessions for bikeshedding the token, in early November.


We’ve also added a new “Relationships” section (#241, closing #220) that talks about relationships to other proposals, like PFA syntax, eventual-send, and Function helpers. We also added a section “F# pipes have been rejected by TC39 multiple times”, partially addressing #221 and #202.

js-choi commented 2 years ago

Starting on 2021-10-25, another formal Commitee plenary occurred. The notes have now been published. We have summarized these updates in #256.

The pipe operator was not presented at this meeting, although an incubator meeting on 2021-11 is chartered for bikeshedding the pipe operator’s topic token. We will post an update about this soon.

Other notes regarding this plenary meeting:

js-choi commented 2 years ago

We had a recent formal TC39 incubator call with publicly available notes in late November 2021.

js-choi commented 2 years ago

Since December, TC39 has continued to discuss the pipe operator in the greater context of “dataflow”. Because this discussion is so crucial to the prospects of the pipe operator (as well as related proposals such as Function.pipe()), here is a summary of what has happened since December. I have also added this to HISTORY.md.

2021-12: Holistic-dataflow articles

The “dataflow” proposals include the following:

There are several “dataflow” proposals that overlap in various complicated ways. Multiple TC39 representatives have expressed concerns about redundancies between these proposals—that the space as a whole needs to be holistically considered, that goals need to be more specifically articulated, and that there is not enough “syntax budget” in the language to approve all of these proposals. This applies to the pipe operator, as well as all the others in that list.

2022-01: Plenary meeting

On January 26, 2022, a plenary meeting was held to discuss these overlapping proposals holistically. This discussion overflowed into an ad-hoc meeting on the next day.

In these two meetings, TC39 representatives debated over such topics as:

Support among TC39 representatives for the pipe operator as it is now (with a Hack-style topic reference) appears to range from strongly in favor to weakly against. Several representatives reaffirmed that they are moderately or strongly against F#-style syntax. Support for Function.pipe appears to be tepid: neither strongly positive or negative. For more details, see the conclusions of the ad-hoc overflow meeting.

2022-03: Upcoming

There is an upcoming plenary meeting. We are planning to continue the holistic dataflow discussion. We are also planning to further bikeshed the topic reference’s token, hoping that we will resolving on a final decision. See the 2021-03 slides. We are not planning to advance the pipe operator to Stage 3 at this meeting, but, if we are able to settle on a final topic token, then we may attempt to advance it at the subsequent meeting in May.

js-choi commented 2 years ago

At the 2022-03 plenary meeting, the Committee mildly preferred @ as the topic reference.

A pull request for changing the specification to use @ has been made: #268.

In related news, an update about call-this was also presented (see https://github.com/tc39/proposal-call-this/issues/10#issuecomment-1078600416), and the Committee mildly preferred receiver-first tight binding. However, call-this continues to polarize the Committee due to ecosystem-schism concerns. (Note: There is a representative who will not allow the pipe operator to advance unless call-this also advances. That is why the pipe proposal is so tightly coupled to the call-this proposal.)

js-choi commented 2 years ago

2022-04

Due to concerns raised by a TC39 delegate (https://github.com/tc39/proposal-pipeline-operator/issues/91#issuecomment-1084946624), @ has been excluded as a topic reference. We’re looking again at ^^, @@, %%, #_, etc.

2022-07

Starting at https://github.com/tc39/proposal-pipeline-operator/issues/91#issuecomment-1182576121, we’ve been taking a fresh look at identifier-like contextual keywords like $_, with the caveat that such a contextual keyword must not be an already-commonly-used identifier and that it would be a syntactic and static binding rather than a runtime ordinary variable.

In the plenary on July 21, proposal-function-pipe-flow was formally presented to the Committee, and it was rejected for Stage 1. The Committee generally found its use cases either easily solved by userland functions, such as:

function pipe (input, ...fnArray) {
  return fnArray.reduce((value, fn) => fn(value), input);
}

…or also solved by the pipe operator (this proposal). (Eventually, after the pipe operator gains users, pain points with the pipe operator may be enough motivation to revive proposal-function-pipe-flow, but that would not occur for a long time.)

There is another incubator call chartered for more pipe-operator bikeshedding, which might or might not occur before the September plenary.