Skip to content

Consider rescript style pipe #247

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

Closed
theqp opened this issue Oct 9, 2021 · 4 comments
Closed

Consider rescript style pipe #247

theqp opened this issue Oct 9, 2021 · 4 comments

Comments

@theqp
Copy link

theqp commented Oct 9, 2021

In my humble opinion the rescript style pipe has the best of both worlds:

advantages from F#:

  • supports tacit style programming (foo instead of foo(%), and foo(bar) instead of foo(bar)(%))

advantages from Hack:

  • has placeholder
  • TC39 guys will not complain about the performance overhead of closures
  • non-fp devs will not complain about currying

The only disadvantage is the complexity compared to the F# one, but that sadly failed.

@mAAdhaTTah
Copy link
Collaborator

mAAdhaTTah commented Oct 9, 2021

It was considered. See #143.

FP devs would probs still complain because their apis are typically data-last, whereas Rescript's pipe is designed around data-first apis.

@theqp
Copy link
Author

theqp commented Oct 9, 2021

@mAAdhaTTah you are right, however as an FP dev who uses ramda and fp-ts I prefer to write and read foo(bar)() compared to foo(bar)(%), both data-last and data-first placing helps currying, even if a little compared to no placing

@theqp
Copy link
Author

theqp commented Oct 9, 2021

It was considered.
I'm trying to help with the elimination of the % in f |> x(%) at #206 (comment)

@theqp theqp closed this as completed Oct 9, 2021
@fxladdercme

This comment has been minimized.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants