00:57
<sffc>

Hi all, jschoi invited me to this channel. I expressed the position during the meeting today that I think it would be worthwhile to continue exploring the space of API functions for method chaining. Although the Function.pipe proposal didn't reach Stage 1, I think it would be helpful to consider that direction in the context of the Pipeline proposal.

The Pipeline champions considered "hack style" and "F# style" options for the pipeline proposal. I would like to see how the use cases would pan out with a third "API style" option. In other words, take the examples that motivate the pipeline syntax operator and show how they would work with Function.pipe, Function.pipeAsync, etc.

01:05
<sffc>
Opened an issue: https://github.com/tc39/proposal-pipeline-operator/issues/273
03:40
<jschoi>
Well, we could do an explicit comparison between topic pipe and pipe function in the explainer, but…chances are it’s not going to get very far.
Pipe functions don’t pipe through n-arg function calls, array/object literals, or other things, other than await for pipeAsync.
I never wanted to position the pipe/flow functions as anything other than an adjunct to the topic pipe.
03:43
<jschoi>
sffc: I had actually invited you to the room here, primarily, to let both you and HE Shi-Jun know that I’m planning to withdraw proposal-function-pipe-flow, and I wanted to offer championing that proposal to you before I archive it. Otherwise I would make it inactive, since I just don’t see any significant chance of it advancing in Committee given the feedback I got today. (My apologies for not making this clearer in my direct message!)
03:44
<jschoi>
(Also, a forewarning: that proposal-pipeline-operator’s issues can get very hot. We’ve had numerous CoC problems in that repository. 🥲)
03:49
<jschoi>

Anyways, regarding your new issue, it might be worth at least exploring the possibility of replacing operators with API. But I suspect it will not get far. For example, consider the explainer’s first example, from React:

console.log(
  chalk.dim(
    `$ ${Object.keys(envars)
      .map(envar =>
        `${envar}=${envars[envar]}`)
      .join(' ')
    }`,
    'node',
    args.join(' ')));

This is not an example where the pipe function would shine compared to the pipe operator (especially given the encouraging-throwaway-closures concern from the engines):

pipe(
  Object.keys(envars)
    .map(envar => `${envar}=${envars[envar]}`)
    .join(' '),
  v => `$ ${v}`,
  v => chalk.dim(v, 'node', args.join(' ')),
  console.log,
);

The explainer’s “real-world code” section has many examples like this.

03:52
<jschoi>
(To be honest, I had wanted to wait until we decided exactly what we should do with proposal-function-pipe-flow—withdraw and archive versus transfer championing to you or Hax—before we announced that it failed to get Stage 1. Because there’s a good chance that people are going to get heated after the announcement, so I wanted to make sure we had a coordinated presentation to the community when we announced it. My apologies for not making this clear! Please do let me know if you want to champion proposal-function-pipe-flow or if you are fine with me withdrawing it.)
03:57
<sffc>
Hey! If you can post those examples on my issue that would be great to get the conversation started
03:58
<sffc>
I'm not currently interested in championing the proposal. But maybe in the future. I think the best path is to finish the main pipeline proposal, get people to start using it, and then a year later, reopen this proposal. That's a multi-year process but things in TC39 take time :)
04:00
<sffc>
Actually the iterator helpers proposal is a good example of that. Iterators have been around for several years now but they didn't come with a lot of standard library functions. So now the champions of iterator helpers can point to packages people have made to work around limitations in iterators in order to motivate their proposal.
04:00
<jschoi>
Sounds good; thank you! (I’ll give HE Shi-Jun a few days to also respond before I freeze the repository.)
04:01
<sffc>
So basically, after pipeline gets users, you can point to pain points to motivate the Function.pipe proposal.
04:09
<jschoi>
sffc: Would you mind also getting rid of the mention, from your issue text, that proposal-function-pipe-flow failed to reach Stage 1? I want to be the first to broadly announce it myself in the announcement thread, after I’ve determined what the repository’s fate is going to be.
04:14
<sffc>
sffc: Would you mind also getting rid of the mention, from your issue text, that proposal-function-pipe-flow failed to reach Stage 1? I want to be the first to broadly announce it myself in the announcement thread, after I’ve determined what the repository’s fate is going to be.
Done
04:15
<jschoi>
Thank you! And welcome to the pipe room!🚰
04:59
<rkirsling>
https://static.wikia.nocookie.net/mario/images/4/44/SMB_Warpzone.png/revision/latest?cb=20200331123731