This repository has been archived by the owner on Jun 29, 2021. It is now read-only.
Enable F#-Style Pipeline Operator #385
Labels
in-discussion
We are still discussing how to solve or implement it
I think many developers would appreciate having the pipeline operator to make code neater, more concise and easier to debug. It is currently an ECMA TC39 Stage 1 proposal.
For those who are unfamiliar with the pipeline operator |>, here is an example. Given the following functions:
The following invocations are equivalent:
There are currently three variants of the pipeline operator that can be enabled:
The minimal variant would be a poor choice because it does not support the await keyword for asynchronous code.
I consider the fsharp variant to be preferable to the smart variant because of its clearer syntax. Having read some community discussion, other people seem to be leaning towards it.
See these links:
https://babeljs.io/docs/en/babel-plugin-proposal-pipeline-operator
https://github.com/valtech-nyc/proposal-fsharp-pipelines
The text was updated successfully, but these errors were encountered: