@@ -826,8 +826,30 @@ context
826
826
827
827
## Relationships with other proposals
828
828
829
- ### Partial-function-application syntax
829
+ ### ` Function ` helpers
830
+ Hack pipes can and would coexist with the [ ` Function ` helpers proposal] [ helpers ] ,
831
+ including its ` pipe ` and ` flow ` functions.
832
+ These simple (and commonly downloaded) convenience functions
833
+ manipulate unary functions without extra syntax.
834
+
835
+ [ helpers ] : https://github.com/js-choi/proposal-function-helpers
836
+
837
+ The pipe champion group has presented F# pipes for Stage 2 twice to TC39,
838
+ being unsuccessful both times
839
+ due to pushback from multiple other TC39 representatives’
840
+ memory performance concerns, syntax concerns about await,
841
+ and concerns about encouraging ecosystem bifurcation/forking.
842
+ (For more information, see the [ proposal history] [ ] .)
843
+
844
+ Given this reality, TC39 is considerably more likely to pass
845
+ ` pipe ` and ` flow ` helper functions than a similar syntactic operator.
830
846
847
+ Standardized ` pipe ` and ` flow ` convenience functions
848
+ may also obviate some of the need for a F#-pipe infix operator.
849
+ (They would not preclude standardizing an equivalent operator later.
850
+ For example, TC39 standardized binary ` ** ` even when ` Math.pow ` existed.)
851
+
852
+ ### Partial-function-application syntax
831
853
Hack pipes can coexist with a syntax for ** partial function application** (PFA).
832
854
There are two approaches with which they may coexist.
833
855
@@ -928,16 +950,30 @@ would be equivalent to `value |?> await foo(^) |?> ^ + 1`.
928
950
929
951
### Tacit unary function application
930
952
** Tacit unary function application** – that is, F# pipes –
931
- could still be added to the language with ** another pipe operator** ` |>> ` –
932
- similarly to how [ Clojure has multiple pipe macros] [ Clojure pipes ]
933
- ` -> ` , ` ->> ` , and ` as-> ` .
953
+ could still be added to the language in two ways.
934
954
935
- [ Clojure pipes ] : https://clojure.org/guides/threading_macros
955
+ First, it can be added as a convenience function ` Function.pipe ` .
956
+ This is what the [ the function-helpers proposal] [ helpers ] .
936
957
958
+ Secondly, it can be added as ** another pipe operator** ` |>> ` –
959
+ similarly to how [ Clojure has multiple pipe macros] [ Clojure pipes ]
960
+ ` -> ` , ` ->> ` , and ` as-> ` .\
937
961
For example, ` value |> ^ + 1 |>> f |> g(^, 0) ` \
938
962
would mean ` value |> ^ + 1 |> f(^) |> g(^, 0) ` .
939
963
964
+ [ Clojure pipes ] : https://clojure.org/guides/threading_macros
965
+
940
966
There was an [ informal proposal for such a ** split mix** of two pipe operators] [ split mix ] ,
941
967
which was set aside in favor of single-operator proposals.
942
968
943
969
[ split mix ] : https://github.com/tc39/proposal-pipeline-operator/wiki#proposal-3-split-mix
970
+
971
+ The pipe champion group has presented F# pipes for Stage 2 twice to TC39,
972
+ being unsuccessful both times
973
+ due to pushback from multiple other TC39 representatives’
974
+ memory performance concerns, syntax concerns about await,
975
+ and concerns about encouraging ecosystem bifurcation/forking.
976
+ (For more information, see the [ proposal history] [ ] .)
977
+
978
+ Split mix might return as a proposal after Hack pipes, but it is much more likely
979
+ that [ ` Function.pipe ` would get standardized instead] [ helpers ] .
0 commit comments