-
Notifications
You must be signed in to change notification settings - Fork 0
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
Bring pipelineOperator
flag in line with minimal
#2
Bring pipelineOperator
flag in line with minimal
#2
Conversation
@js-choi For your review. |
) { | ||
throw this.raise( | ||
this.state.start, | ||
`Unexpected "await" after pipeline body; await is banned in minimal proposal`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this error message should be tweaked to say that bare pipeline bodies |> await
are banned in the minimal proposal, not await
in general. The minimal proposal does allow await
as long as it’s not |> await
. For instance, x |> (await promiseThatWillResolveToFunction)
. I…think. See tc39/proposal-pipeline-operator#108 (comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, right, I should check that:
x |> (await p)
parses correctly, as that's still allowed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the error message. it parses correctly as-is though.
The changes look good to me, with one exception on which I’ve commented.
Have you come to a decision about the F-Sharp Proposal’s precedence between |
I haven't yet, but the current minimal requires it, so I'm punting that decision until I implement it. The parenthesized arrow functions is the only difference between F# and the other two, but F# relies on arrow functions to flesh out its usefulness, so I'm still trying to decide if the trade-off is worth it. The other alternative would be to hitch F# to partial application and try and advance them both together. Parentheses may not be bad enough to worry about, and it does come with some unpleasant side effects ( |
The minimal proposal requires parentheses around arrow functions and bans await from the pipeline. The `fsharpPipeline` flag will be responsible for enabling the await-in-pipeline behaviors.
6cc321c
to
8bff3f3
Compare
Understood. The pull request with 8bff3f3 looks good to me. |
The minimal proposal requires parentheses around arrow functions
and bans await from the pipeline. The
fsharpPipeline
flag willbe responsible for enabling the await-in-pipeline behaviors.