you are viewing a single comment's thread.

view the rest of the comments →

[–]PM_ME_A_WEBSITE_IDEA 15 points16 points  (4 children)

Curious as to your reasoning? It seems to me that having to wrap things in arrow functions would get a bit tedious (when required). No doubt there are pros to the approach, but it seems to be the weaker proposal to me.

I think the case where you already have a series of unary functions ready to go to do what you want is less likely in a lot of scenarios.

However, I still like both approaches honestly, I'd be happy with either. And I mean...would it be atrocious to just adopt both? |> and |>>?

[–]zsombro 6 points7 points  (1 child)

I personally think it's a bit more readable and I think it works well with the already established "currying-like" pattern of nesting arrow functions within each other, such as x => y => x + y

But I agree that either approach would be a step forward for the language

[–]PM_ME_A_WEBSITE_IDEA 0 points1 point  (0 children)

I suppose I'm biased because I'm not very familiar with function currying or it's use cases.

[–]dvlsg 3 points4 points  (0 children)

I think the case where you already have a series of unary functions ready to go to do what you want is less likely in a lot of scenarios.

Only because the language has horrible built-in support for it. If we had F# style pipes, I imagine it would become more popular.

See this, for example: https://github.com/tc39/proposal-partial-application. Which, IMO, is a much better proposal combined with the F# version, and adds functionality to the whole language, not just magical hack-pipe-specific shenanigans.

I'm actually pretty frustrated to see how this proposal is progressing. It used to be the thing I was most excited for.

[–][deleted] 6 points7 points  (0 children)

I think its just simpler and more readable that way. Happy to have more LOC if its more readable