Skip to content

Viability of using |: as the operator for Hack-style #237

@shuckster

Description

@shuckster

Pulling this from the readability thread. I hope this is different enough from both that and the Tacit unary function application section of the main proposal to warrant a separate discussion.

|: has been suggested as an alternative operator to |>

value 
  |: extractBusinessData(^) 
  |: await mergeWithWebServiceData(^) 
  |: processResults(^) 
  |: printResult(^);

This would avoid foreclosing on using |> for a potential future operator familial to FP'ers.

Quoting from @lozandier's essay:

While I'm adamant a tacit, first-class functional-composition pipeline operator should ship in the language as originally desired by this proposal, I'm even more adamant hack-style doesn't prematurely reserve the ubiquitous means of representing such operators for its usage.

--@lozandier

It seems fair to note that @mAAdhaTTah originally proposed |: for Split Mix. I don't want to speak for him other than to honour the originator of the idea, but I feel it's important to bring in this quote:

I just want to clarify that I was not suggesting I was open to Hack-style being |:

--@mAAdhaTTah

I hope it's okay to suggest it separately here.

EDIT - Correction from @mAAdhaTTah , it was originally suggested here: #75 (comment)

A few posts have in the readability thread popped up in support of |: (along with their respective emojis) so I thought we might be better off with a dedicated thread to expand on these thoughts and hear about the viability of this idea from the champions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bikeshedDiscussion about naming or similarquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions