-
Notifications
You must be signed in to change notification settings - Fork 107
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
Push a minimal proposal to Stage 3 asap #140
Comments
Yeah, no, they won't, and they shouldn't, as the proposal can still change. I can only imagine the headaches the decorator proposal changes are causing over there. There are two issues with this suggestion:
For these two reasons, I would not be in favor of rushing through a minimal proposal. Additionally, I think we end up with the pipeline operator we "want" (for whatever that means) faster if we do it whole cloth here and get it right the first time than trying to break it up into steps. This initial process may take longer, but the time to push through a minimal + an advanced later is almost certainly greater than the time required to push through a complete proposal now. |
I think the most helpful thing you can do is document your use cases that you need the pipeline operator for so much, and maybe offer a suggestion of which proposal best fits these use cases in your mind. |
Pipes are the operators we need but not the ones we deserve. 😄 Jokes aside, I agree with your 1st issue. This is why I suggest to make even bigger cuts in the functionality, to have a proposal free to adapt to reasonable future changes. The only "genie question" in this case is whether it is a good idea to introduce pipes at all. Regarding the examples in the 2nd one:
So I think this "minimal proposal" is technically viable. Maybe it's even less than the original minimal proposal presented before, but hey, at least something we can use. Because I'm afraid that the advanced proposals might take a few years to get finalized. You might be right about the timing, but as a developer I believe I would mostly use the features of the minimal proposal. Gut feeling: approx 70-80% of the use-cases. So I'd rather go with this approach. Plus if the TS community gets the minimal proposal that will generate a huge developer feedback. There are lots of developers waiting this feature to be available. Some of them may even join the discussions here how to finalize the advanced proposal. Note that this could affect timing, maybe in both directions... |
At that point, the proposed pipeline would be so restrictive, it would lose a lot of its usefulness, and I'm simply not convinced of the benefits of pushing it through faster vs getting it right the first time. The proposal isn't as large as something like
We're currently working on Babel plugins for all 3 proposals for this specific purpose. We don't need to rush through a proposal to get feedback. All that said, I appreciate your enthusiasm! I think we'll get there; we've made a lot of progress, and I don't think any of the particular proposals have show-stopping hangups. We just need to choose one, and I'd rather do the work to choose the right one then lose our opportunity trying to push through an incomplete feature. |
If you want to help, it'd be great to see a Babel implementation of the F# pipeline proposal, and then collect feedback about the four alternatives (bind, F#, smart, don't-add-anything). @mAAdhaTTah maybe we should have a good write-up of this strategy that exposes opportunities for folks to get involved. |
@littledan I'd be into that. The main problem right now is we're blocked on making much progress until this PR is landed: babel/babel#8289 I don't know as we can proceed too much further without getting that landed, as the F# proposal will be working in the same area of the parser. I also still want to play around with paren-less arrow functions, which may require some parser changes as well (although some of those changes may already be in the proposal above). I've poked the babel people on Slack a few times; maybe I need to poke a little harder? My intention was to get the 3 implementations into babel then go out and do some barnstorming. There's a few meetups in NYC, and least one of them records all their talks, so that'll make for some good material, plus additional blog posts and the like. |
@mAAdhaTTah That sounds like a good plan. While you're blocked on review, maybe start developing the F# proposal on top of the other one (even in the same mega-PR)? |
@littledan Yeah, I've been thinking I should. Also gotta resolve those conflicts, but things have been quite busy for me lately (just switched jobs), so it's been a bit tough. Once things settle down, I'll definitely just start plugging away at that. |
Just for the record: I am working on the Babel transform for the smart proposal based on @mAAdhaTTah's parser PR. |
@mAAdhaTTah for the record, babel/babel#8289 PR has landed in 7.2.0 babel |
This proposal is more taking its time to make sure it's useful enough to "pay for itself" than because it is too big. The committee isn't sold, as a whole, that we should do anything at all. I agree with the above comments from @rpamely and @mAAdhaTTah . There is a minimal proposal, it is the spec text in this repo, and Babel supports it. |
@Dabolus Does that typecheck? My understanding is because TS doesn't support this syntax, it's not going to confirm that the types flowing through the pipeline match as expected, in which case, being able to write TS with the pipeline operator isn't that valuable. |
@mAAdhaTTah you got it right, and I find it pretty much useless too. However, that's currently the only way to make it work, so maybe the OP might find it useful to start working with it until some pipeline proposal reaches stage 3. |
@mAAdhaTTah your arguments come from subjective emphasis.
Yes, and that is okay.
This is not a versus. You're arguing against a risk, in multiple comments of yours here, which doesn't exist. As mentioned, and you indirectly acknowledged, there is an MVP for this, which means that it's not a dead end for any of the variations. The amount and foreseeable amont of bikeshedding justifies the idea to push through an MVP first.
By what measure do you make this comparison? And why whould incrementalism need justification from such a measurement? Incrementalism is nice in any way. And putting this aside, pipeline operator do seem to have a lot of hidden complexity, which in my view by far measure up to class in whatever regards. |
Any evaluation is subjective. Saying "your arguments are subjective" suggests there's some kind of "objective" way of analyzing this. There isn't. We just have various subjective ways of evaluating things. To speak to the incrementalism: The main issue there is there are paths that, if we proceed down now, cut us off from potential options later. Disagreements on the nature of arrow functions and what syntax is allowed and isn't between the 3 proposals would limit the potential options if one of them won out now. I outline some of that above; happy to elaborate if any of that isn't clear. That said, the committee is not going to accept the minimal in its current form unless we've fully ruled out alternatives; specifically, a minimal without The risks aren't simply my POV but my understanding of the view of the committee (of which, to be clear, I am not a member and do not speak for). I do agree with them, and I've made those arguments as I've seen them, and as such, I remain opposed to rushing through an incomplete proposal. |
I again see a flip-flopping arguing against the MVP. Which one is the case in your opinion?
(1) is a factual question. I think it obviously exists. If there's disagreement on the nature of arrow functions, then MVP is by definition the most restrictive variation. |
You can't count allowing |
I don't believe I claimed there wasn't an "MVP." You feasibly could strictly allow bare identifiers, which would be a subset of all the proposals.... but why? |
The big thing we need to push the proposal forward is demonstration that the proposal is broadly useful, in code bases of various styles. We should figure out some way to work together to do this, but I'm not really sure how. Let's see if we can come up with ideas here. |
There seems to be a disagreement between @gilbert and @mAAdhaTTah on the existence of an MVP. gilbert says
To achieve the very basic goal pipeline is for: avoid nesting of function applications. |
@sarimarton One example: If elixir-style is chosen, then having both |
@gilbert Then restrict it to barebone identifiers, and you get an MVP which contains no irreversible decisions. |
Except the irreversible decision of having an incomplete feature in the language (unless we could complete it by arriving at consensus on the rest) |
This argument has 2 problems:
|
That was my original point. Such a restriction is the irreversible decision. |
Why would it be irreversible?? Restrictions' very point is to remain flexible about lifting them up. Lifting up a restriction later is a language addition. It's incremental. This happens all the time (think of Template Literal Revision, or first versions of ES6 classes and later additions etc.) I think we should clarify the term irreversible here. The only meaningful interpretation IMO is that it can produce code which can be broken with a later step. That's not the case with a properly restrictied version. |
It's irreversible in that you can't remove it as well. The committee, as I understand it, is not strictly convinced pipelining is a problem to be solved, nor is it necessarily convinced the pipeline operator is the best way to do it. There's more than a few who would prefer bind I don't think a bare identifier approach is particularly useful either. If you can't do |
So it's the bind operator which holds it back... Then I guess there should be a discussion of which of these proposals we want to pursue. I have a guess that for the bind operator there would be much much less demand. It's too much domain specific, and actually it itself demands domain specific practices in terms of the overlapping functionality with pipeline: library functions should use I admit that this wording might sound too much decided, but to put it short, I think it makes sense nowadays that
|
The bind operator has 3 use cases; pipeline covers 2 of them. It's fine to not have the bind operator and have pipeline instead, but we also need a separate way to do method extraction. It definitely doesn't make sense that "we don't need |
@gilbert makes a strong point that, if we go with the F# proposal, then we can't go back and select Elixir, but I wonder if we might be able to start with F# and have a follow-on which supports some kind of placeholders. @js-choi has articulated that there is a "footgun" risk to allow arbitrary expressions on the right hand side of @ljharb I disagree with you that we need to provide these both with one proposal, just because someone previously articulated the different pieces of functionality together. The get-originals proposal (which I think would make sense across environments, assuming it's provided by a built-in module that can be polyfilled/virtualized) can provide access to the original |
Right, that's the meaning we're using here. If you allow |
@littledan that’s not what i claimed; as i stated in the meeting when pipeline went to stage 1, i consider it a stage 2 requirement to establish how a different proposal could reasonably handle method extraction, since pipeline going to stage 2 effectively blocks the bind operator. The get-originals proposal would have to be part of the language, and also allow for polyfilling, in order to supply that use case sufficiently, and i don’t believe it’s currently intended to be proposed for the language. |
@ljharb I intend to address method extraction with a separate proposal at some point. |
That’s great :-) id love to see the shape of it, and ideally have it at stage 1, before pipeline progresses. |
@zenparsing The more I think about your |
For spectators just trying to follow this, the |
Closing this issue, as the proposal has advanced to stage 2 with Hack-style syntax. |
Currently I work with TypeScript so I cannot use the Babel plugin. And man, I need this feature so badly. The TS team has a deep discussion of this proposal but I it's unlikely that they will implement anything before Stage 3.
For me it seems that there's still a lot to do with the competing proposals and Stage 3 seems very distant. Wouldn't it be possible to create a minimal proposal first, covering only the basic use-cases that work the same way in all of the complex proposals? Maybe we have no
await
keyword in this minimal proposal, no template literal support, must use parentheses around arrow functions, etc. -- anyways, we've got the basic usage which is sufficient for many real-life use-cases. And the TS team could start implementing it, and lots of the developers could start using this feature.In the meantime you can refine the advanced proposals which will extend the minimal proposal. After a few years (?) when all the issues will be resolved and the complex proposal will be finalized there would be an update to the syntax which would enable the more advanced use-cases that were prohibited in the first version.
So would you create an MVP of this proposal first, then move on to the advanced use-cases? We need this feature badly.
The text was updated successfully, but these errors were encountered: