-
Notifications
You must be signed in to change notification settings - Fork 25
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
Remove references to pipelines #47
Comments
Removing the examples wouldn't reduce the hostage situation–the presence of a placeholder in Hack at all puts the two proposals in conflict, because the committee won't advance two solutions for placeholders into the language. |
It wouldn't eliminate the stand-off. But it would make it clearer that:
Which would hopefully make the stand-off easier to resolve. |
There are four possible ways for the pipeline proposal to move forwards:
If partial application goes in, then we've immediately ruled out hack pipes as an option. Your conclusion:
seems to already be ruling out hack pipes as an option (if we decide that partial application will go in, and pipeline must accommodate it, then hack pipes will not be an option). It's true that partial application has value by itself, but it's not going to go into the language until we've decided which of those four paths laid out above we want to take. The two proposals must be intertwined, neither proposal can go in until the overall path has been decided. Once a path has been decided, then these proposals can evolve independently and go in at their own time, when they're ready. |
In #49 I've removed some references to pipelines and have commented out others that I intend to rewrite. There is still a use for partial application in conjunction with Hack-style pipelines, it just isn't the same use that it might have had with F#-style pipelines: const add = (x, y) => x + y;
const greaterThan = (x, y) => x > y;
// using Hack-style pipes
elements
|> map(^, add~(?, 1))
|> filter(^, greaterThan~(?, 5)); |
I've added an update to #49 that shows partial application in combination with Hack-style pipelines. |
This feature is being held up by the pipeline operator, when it should be the other way around. This proposal in no way depends on the pipeline operator. Maybe this could be moved forward, as suggested in #36, by getting rid of the pipeline examples and focusing on the many, many other use cases? That way, this proposal can be evaluated on its own merits. For example, we can just use an array in the "player scores" example in the readme.
It's understandable that Hack and F# are at odds in the other proposal, since they're basically incompatible. But that really has nothing to do with partial application. It would be bizarre if by Hack "winning" we lost the ability to use partial application outside of pipelines too.
@rbuckton would you be open to a PR removing pipelines from the example here? Then this can be established more clearly as a nice-to-have dependency of F# pipelines, and not much to do with Hack pipelines at all.
The text was updated successfully, but these errors were encountered: