Skip to content

Align with the pipeline operator proposal's choice #9

Description

@dead-claudia

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions