I’m hoping the parser could parse
!> as an operator similar to the pipe operator, but it will not be defined in Base by default instead it can be used by package developers if they want to show some of their callable objects has side effect explicitly while enabling users to use pip operator.
Although it is not possible to control and infer side effects for Julia compiler, it is always possible to show this explicitly by API design. Currently, we only have a pip operator that works for any callable object. I think this is also consistent with our current API design (by naming functions with side effects with ! in the end), so it is probably something missed for pipe operators.
In my use case, due to the quantum non-cloning theorem, all the operations on a quantum computer have to be in-place on quantum registers since we are not allowed to copy the register state, however, pipe operator is something perfect for representing a chain of quantum gates (some linear operators) to the register, but
|> is not something very elegant since it cannot show the call chain are all in place functions, I’d like to have something like the following
!>(x, y) = apply!(x, y) r !> H !> H !> H
update: I posted a PR since it’s quite simple, https://github.com/JuliaLang/julia/pull/35770