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

Align with the pipeline operator proposal's choice #9

Open
dead-claudia opened this issue Apr 20, 2018 · 1 comment
Open

Align with the pipeline operator proposal's choice #9

dead-claudia opened this issue Apr 20, 2018 · 1 comment

Comments

@dead-claudia
Copy link
Owner

Currently, there's three leading variants for the pipeline operator proposal:

Here's what I want Object.then/Object.chain (and async variants) to be used like:

  • F#-style:

    • coll |> Object.then(...funcs)
    • coll |> Object.asyncThen(...funcs)
    • coll |> Object.chain(...funcs)
    • coll |> Object.asyncChain(...funcs)
  • "Smart" pipelines:

    • coll |> Object.then(#, ...funcs)
    • coll |> Object.asyncThen(# ...funcs)
    • coll |> Object.chain(# ...funcs)
    • coll |> Object.asyncChain(# ...funcs)
  • this-bound pipelines:

    • coll::Object.then(...funcs)
    • coll::Object.asyncThen(...funcs)
    • coll::Object.chain(...funcs)
    • coll::Object.asyncChain(...funcs)

Here's how I'll need to go for each variant:

  • F#-style:

    • Object.then(...funcs) -> coll => result
    • Object.asyncThen(...funcs) -> coll => result
    • Object.chain(...funcs) -> coll => result
    • Object.asyncChain(...funcs) -> coll => result
  • "Smart" pipelines:

    • Object.then(coll, ...funcs) -> result
    • Object.asyncThen(coll, ...funcs) -> result
    • Object.chain(coll, ...funcs) -> result
    • Object.asyncChain(coll, ...funcs) -> result
  • this-bound pipelines:

    • Object.then.call(coll, ...funcs) -> result
    • Object.asyncThen.call(coll, ...funcs) -> result
    • Object.chain.call(coll, ...funcs) -> result
    • Object.asyncChain.call(coll, ...funcs) -> result

I currently have it aligned with a mixture of "smart" and F#-style throughout the redesign, but I'd like to stick with what works with the pipeline operator of choice.

@dead-claudia
Copy link
Owner Author

Okay, they aligned on Hack-style pipelines, and seem to show interest in this specifically. I'll need to revisit this as I'd need to redesign quite a few things (and have since learned a few new ways of dealing with asynchrony that's a little more flexible).

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

No branches or pull requests

1 participant