-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pipeline Operator (Stage 1) #29
Comments
There is also another Babylon implementation (https://github.com/airdwing/babylon), which could be already mergeable because the fork was updated one month ago. |
didn't know it was that simple ha - needs hasPlugin, tests, readme, etc though |
Oh right 😅 |
Merged the parser PR |
Transform PR: babel/babel#6335, test at https://babeljs.io/repl/build/5099/ |
Linking to Dan's syntax concern (not specced) tc39/proposal-pipeline-operator#60 |
Some syntax used in the spec repo examples that doesn't parse currently: are these supposed to be?
|
I would expect that to parse as long as |
@hzoo You are right, the explained does not match the spec. Sorry for this state of things. I hope to address it soon. |
Address in the sense of adding more parens in the explainer; I don't have a clear idea of alternative syntax. |
@js-choi @mAAdhaTTah Could you summarize the current plans here for future reference? |
@littledan I’ll write one. Edit: Dang, beaten to it. |
@littledan We're working in parallel on a configuration option for two proposals: F# Pipelines & Smart Pipelines. @js-choi is currently working on the babylon changes required to parse the Smart Pipelines, behind a As part of this work, I'll be submitting a PR to the pipeline proposal itself to update the spec to remove any current handling of Once the parser changes are complete, we'll then be updating the babel pipeline plugin with a configuration options for these proposals. I don't think we've specified what that flag is just yet, but the intention is to have three "modes": I'll also eventually be writing up a spec & explainer for F# pipelines. The current spec & explainer for smart pipelines is here: https://github.com/js-choi/proposal-smart-pipelines |
Is this available to test on the REPL ? I can't get it to work |
@danielo515 The minimal proposal is in babel right now, but the rest of what I explained is still in progress. Past 2 months have been busy for both JS Choi & me, so we haven't made as much progress as we'd like. Also, the plan has changed from what was described above; we're going to add all those flags in a fork of |
I think that we could merge them even before stage 2, since now Babylon supports plugin options |
Couple updates I want to drop in here:
I'll be working on point 2 ASAP, as that needs to land before babel 7 leaves beta. |
I was curious what was up with the pipeline operator in babel? Every plugin I've tried hasn't worked, and even in the repl with the specified package it won't compile. I'm excited by this proposal and I recently wrote an article about the pipeline operator (Medium: JS Pipeline Operator Article) and created my own pipeline operator playground: (CodePen: PipeLine Operator Playground). I was hoping that by now babel would have an official working plugin available for it, but nothing seems to be checking out. |
@zfrisch There's a Project on babel with the current status: https://github.com/babel/babel/projects/9 - we have several proposals we're trying to land, so a lot going on before we're done. |
See also @mAAdhaTTah’s article “What’s Happening with the Pipeline Proposal?”. We’re working on implementing a bunch of preliminary proposals, each with their own trade-offs, so that TC39 and others can try them out, hands on. |
What is the current stage of this proposal? |
Stage 1, last presented in March 2018 |
Is this minimal or F#? |
@goodmind none has been selected. It's not until stage 2 that the shape of the solution is mostly settled. |
@ljharb When will be the "stage 2"? |
@ktrzos no idea - the champions of the proposal would have to decide its ready, and add it to a meeting agenda in advance of the deadline for doing so, and then the committee would have to agree. The next such opportunity is at the end of January, but it remains up to the proposal champions to decide when that next step is warranted. |
Champion: @littledan
Spec Repo: https://github.com/tc39/proposal-pipeline-operator
First presented at Sept 2017 meeting: https://github.com/tc39/agendas/blob/master/2017/09.md
Slides: https://docs.google.com/presentation/d/1qiWFzi5dkjuUVGcFXwypuQbEbZk-BV7unX0bYurcQsA/edit#slide=id.p
Related proposal: Partial Application https://github.com/rbuckton/proposal-partial-application by @rbuckton
Related proposal: Function Bind Operator https://github.com/tc39/proposal-bind-operator
Basic Example
Input
Output
Initial Implementation (would need updating to v7)
Old/Alternative Implementations
<<
and>>
: https://github.com/michaelmitchell/babel-plugin-pipe-compositioncc @gilbert, @SuperPaintman
Implementation
The text was updated successfully, but these errors were encountered: