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

Add reverse pipe operator that is right associative and low precedence. #291

Open
baronfel opened this issue Oct 14, 2016 · 0 comments
Open

Comments

@baronfel
Copy link
Owner

Add reverse pipe operator that is right associative and low precedence. [6135254]

Submitted by Mårten Rånge on 7/4/2014 12:00:00 AM
9 votes on UserVoice prior to migration

The current reverse pipe (<|) is left-associative and same precedence.
Left-associativity is "unnatural" for reverse pipe making it's usage harder, ie this doesn't compile: let x = abs <| abs <| 2;
In addition sharing the precedence of |> makes mixing them harder.
There are already existing languages with such an operator ie Haskell and operator '$'.
I propose adding a right-associative low precedence reverse pipe operator to F# in order to improve reverse-piping.
I know some people disagree with reverse-piping but I personally like it as it can be used to remove parantheses. To me excessive amount of paratheses makes code harder to read (I guess this is the reason I struggle to enjoy LISP).

Response

** by fslang-admin on 2/5/2016 12:00:00 AM **

Thanks for the suggestion, though I’m declining per my comment below.
Many thanks,
Don Syme, F# Language and Core Library Evolution

Original UserVoice Submission
Archived Uservoice Comments

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

No branches or pull requests

1 participant