# Fixing the Piping/Chaining Issue (Rev 3)

**URL:** <https://discourse.julialang.org/t/fixing-the-piping-chaining-issue-rev-3/90836>\
**Category:** Internals & Design\
**Tags:** multithreading, syntax, piping, chaining, threading\
**Created:** [November 26, 2022, 2:50am UTC](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue-rev-3/90836 "2022-11-26T02:50:46Z")\
**Posts on this page:** 10\
**Page:** 5

<div class="post-metadata">

**Author:** ![uniment](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/uniment/32/24532_2.png) [@uniment](https://discourse.julialang.org/u/uniment)\
**Post date:** [January 22, 2023, 9:38pm UTC](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue-rev-3/90836/81 "2023-01-22T21:38:05Z")

</div>

Good point—but quite a bit of this proposal is already redundant with `|>` and `∘`, but with better ergonomics and lower compiler strain.

And let’s not forget the urge which inspired this whole saga, which is to provide a proper chaining syntax for autocomplete hints, esp. for multi-arg functions.

---

<div class="post-metadata">

**Author:** ![uniment](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/uniment/32/24532_2.png) [@uniment](https://discourse.julialang.org/u/uniment)\
**Post date:** [January 29, 2023, 2:18am UTC](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue-rev-3/90836/82 "2023-01-29T02:18:17Z")

</div>

Update: Previously I had forced every local assignment to be a `local` assignment. I have decided to relax this, so that chains are now able to mutate existing identifiers in their enclosing scope.

Chain scopes are still hard local scopes, so for mutating global variables the `global` keyword must be used.

---

<div class="post-metadata">

**Author:** ![melonedo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/melonedo/32/15503_2.png) [@melonedo](https://discourse.julialang.org/u/melonedo)\
**Post date:** [February 5, 2023, 11:21am UTC](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue-rev-3/90836/83 "2023-02-05T11:21:21Z")

</div>

I think this proposal is indeed much more appealing and more interesting than the previous two, for this proposal is much more easy to understand from someone who has occasionally used Underscores.jl, although I do hope the `.x{f, g, h}` syntax be replaced by something more “Julian” like `x chain f g h end`.

With the first proposal, I really lost myself in the `/` and `\` stuff. The second one is also non-intuitive to understand: it is very strange to think that `f` in `x--(f; it^2+it; it/5)` fundamentally different from a value, and instead a shortcut for `f(it)` without the parentheses and the placeholder `it`.

As a side note, I think you should update the link in the first proposal to directly link to this one. I just spent 10 minutes to read the second proposal only to discover that it is abandoned.

---

<div class="post-metadata">

**Author:** ![ShalokShalom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shalokshalom/32/52462_2.png) [@ShalokShalom](https://discourse.julialang.org/u/ShalokShalom)\
**Post date:** [September 7, 2023, 11:47pm UTC](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue-rev-3/90836/84 "2023-09-07T23:47:26Z")

</div>

I really like the underscore syntax for partial applications.

It reminds me a lot about the underscore in F#, where it is used as a wildcard in pattern matching. So my brain basically saved it as “fill that space in with x”, and that maps nicely to this new functionality.

I find partial application to be elegantly represented via \_ 👌🏼  
Good job!

The second part, MethodChains, seems also too good to not do that way.

I totally understand, how this is a rare occasion, where everything lines up this way, in a language that has already settled in so many ways.

Julia has already used lots of operator symbols and syntax constructs for other functionality.

I find that syntax intuitive, and fitting. It looks quite clean to me, and although I could have preferred something a little more declarative, so something that visually signals what it does, such as |\>, \>\>, is it fine as it is, and I love it. 👍🏼 ❤

The last part, about multiple chaining, is the most interesting part.  
COBOL is known for this type of column based programming, and I don’t know if you know that.

It’s mocked a lot for it, and both the language and the feature are somehow MEMEs. 😉  
But I like how it looks at a first glance, and I am ready to defend it in the public. 😃

Overall, great work, and great that you invited the community in such an open-minded way.

---

<div class="post-metadata">

**Author:** ![gvdr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gvdr/32/6387_2.png) [@gvdr](https://discourse.julialang.org/u/gvdr)\
**Post date:** [November 25, 2023, 4:11am UTC](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue-rev-3/90836/85 "2023-11-25T04:11:29Z")

</div>

Hi @uniment , and thanks for all the work you are doing in this space. I think the functionality are great, and the options that are opened by the multi chaining are very interesting.

I was wondering about what your plan on registering\* the package where. I’d love to use it on Pluto (and although it’s possible to do it, using `Pkg.add` breaks Pluto’s package manager). Is there something we can do to help you?

- I assume you intend to register it, but I might be wrong.

---

<div class="post-metadata">

**Author:** ![gvdr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gvdr/32/6387_2.png) [@gvdr](https://discourse.julialang.org/u/gvdr)\
**Post date:** [January 24, 2024, 12:12am UTC](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue-rev-3/90836/86 "2024-01-24T00:12:45Z")

</div>

So, what is the etiquette here? Would it be ok to fork this package if it is still of interest to the community and the author is not engaging with it anymore?

---

<div class="post-metadata">

**Author:** ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)\
**Post date:** [January 24, 2024, 1:25am UTC](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue-rev-3/90836/87 "2024-01-24T01:25:43Z")

</div>

> [@gvdr](#):
>
> Would it be ok to fork this package

You might open an issue on their repo in case they’re just not monitoring Discourse. Otherwise go ahead and fork.

> [@gvdr](#):
>
> if it is still of interest to the community

Keep in mind there is a lot of disagreement on how to handle the chaining issue so each additional packge will be yet another package in the sea of such packages, even if it’s a particularly good package.

---

<div class="post-metadata">

**Author:** ![uniment](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/uniment/32/24532_2.png) [@uniment](https://discourse.julialang.org/u/uniment)\
**Post date:** [February 9, 2024, 11:04pm UTC](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue-rev-3/90836/88 "2024-02-09T23:04:11Z")

</div>

Apologies for my tardiness! I’ve been AFK for a while and have forgotten how to use a computer. I’ll see about registering it soon.

---

<div class="post-metadata">

**Author:** ![gvdr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gvdr/32/6387_2.png) [@gvdr](https://discourse.julialang.org/u/gvdr)\
**Post date:** [February 14, 2024, 5:19am UTC](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue-rev-3/90836/89 "2024-02-14T05:19:28Z")

</div>

Amazing. And sorry for having pestered you 😅

---

<div class="post-metadata">

**Author:** ![George9000](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/george9000/32/23619_2.png) [@George9000](https://discourse.julialang.org/u/George9000)\
**Post date:** [April 5, 2024, 3:13am UTC](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue-rev-3/90836/90 "2024-04-05T03:13:54Z")

</div>

Trying the examples in this repo and then using it in tandem with the [PartialFuns](https://github.com/uniment/PartialFuns.jl) package gives the sensation of tripping the light fantastic in Milton’s [original sense](https://en.wikipedia.org/wiki/Trip_the_light_fantastic). Twenty years ago when I first looked at the language structure manipulations possible in Mathematica using pattern matching to operate on the language itself, I experienced a similar, ‘Wow.’ I have some hesitancy about incorporating them into work projects given the exploratory nature of both, though I haven’t yet made them break.

[Previous page](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue-rev-3/90836.md?page=4)
