Skip to content
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

F# pipeline operator #7898

Closed
wants to merge 13 commits into from
Closed

Conversation

goodmind
Copy link
Contributor

@goodmind goodmind commented Jul 6, 2019

Discussion: #5443

  • await parsing
  • arrow body parsing
  • .flowconfig option

@goodmind
Copy link
Contributor Author

goodmind commented Jul 7, 2019

image

@goodmind
Copy link
Contributor Author

goodmind commented Jul 7, 2019

I ended up implementing typechecking as well 😀
But I have no idea how to implement arrow functions without parens

@goodmind
Copy link
Contributor Author

goodmind commented Jul 7, 2019

Babel PR babel/babel#9450 for reference

@goodmind
Copy link
Contributor Author

goodmind commented Jul 7, 2019

Well, there's already was function body parsing in assignment_cover, so I just copy-pasted it

@goodmind
Copy link
Contributor Author

goodmind commented Jul 7, 2019

I don't think it's possible to implement all three proposals in Flow, because there isn't such thing as parser plugins.
Flow just parses everything and then errors on wrong things with PseudoParseError

@goodmind goodmind changed the title [WIP] Add F# pipeline operator Add F# pipeline operator Jul 7, 2019
@goodmind goodmind changed the title Add F# pipeline operator F# pipeline operator Jul 7, 2019
@goodmind
Copy link
Contributor Author

goodmind commented Jul 7, 2019

@mAAdhaTTah What you think? Is this still too early?

@mAAdhaTTah
Copy link

Probably. I don't know the Flow team's policy around this sort of thing. I know TS won't implement anything until stage 3, especially after the pain they've had with decorators.

I'll point out that the committee isn't necessarily sold on the operator at all and there is a significant contingent who prefer the bind operator. Not only are we risking implementing the wrong version of the operator, we're risking the syntax not advancing and needing to rip it out.

@goodmind
Copy link
Contributor Author

goodmind commented Jul 7, 2019

Well, Flow supports nullish coalescing, and optional chaining under flag, but they're still stage 2, but doesn't support other proposals
Also Flow even implements enums without proposal (but it probably would be released), so it is technically stage -1 #7837

@goodmind
Copy link
Contributor Author

goodmind commented Jul 8, 2019

@mAAdhaTTah I thought bind operator was dropped in 2015 and always was stage 0?

@mAAdhaTTah
Copy link

AFAIK, Bind is still Stage 1, but it's stalled out. However, we have gotten suggestions, including from committee members, about bind: tc39/proposal-pipeline-operator#110 and tc39/proposal-pipeline-operator#107 so I'm still viewing it as a competing proposal.

@SamChou19815
Copy link
Contributor

Closing since the PR has too many merge conflicts, and we do not plan to implement proposals before stage 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants