# On adjoints and custom postfix and infix operators

**URL:** <https://discourse.julialang.org/t/on-adjoints-and-custom-postfix-and-infix-operators/12863>\
**Category:** Internals & Design\
**Created:** [August 3, 2018, 7:24am UTC](https://discourse.julialang.org/t/on-adjoints-and-custom-postfix-and-infix-operators/12863 "2018-08-03T07:24:25Z")\
**Posts on this page:** 1\
**Showing post:** 35

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [August 3, 2018, 6:24pm UTC](https://discourse.julialang.org/t/on-adjoints-and-custom-postfix-and-infix-operators/12863/35 "2018-08-03T18:24:30Z")

</div>

> [@jekbradbury](#):
>
> I think the main use is/is going to be defining operators that are “kind of like” existing operators and should have similar precedence. That is, if `•` is defined for matrix multiply, it can be given the precedence of `*` (which is always elementwise).

Putting aside the fact that `*` is already matrix multiplication, there are _lots_ of allowed user-defined operators that are “kind of like `*`” and have the same precedence (in fact, infinitely many):

- Any of the other Unicode symbols [with the same precedence](https://github.com/JuliaLang/julia/blob/a882d9bf183fc93319002c9158f406f0755c202e/src/julia-parser.scm#L29): `∧ ⊗ ⊘ ⊙ ⊚ ⊛ ⊠ ⊡ ⊓ ∗ ∙ ∤ ⅋ ≀ ⊼ ⋄ ⋆ ⋇ ⋉ ⋊ ⋋ ⋌ ⋏ ⋒ ⟑ ⦸ ⦼ ⦾ ⦿ ⧶ ⧷ ⨇ ⨰ ⨱ ⨲ ⨳ ⨴ ⨵ ⨶ ⨷ ⨸ ⨻ ⨼ ⨽ ⩀ ⩃ ⩄ ⩋ ⩍ ⩎ ⩑ ⩓ ⩕ ⩘ ⩚ ⩜ ⩞ ⩟ ⩠ ⫛ ⊍ ▷ ⨝ ⟕ ⟖ ⟗`
- Just take `*` (or one of the above) and add one or more of any of the allowed operator suffixes in Julia 0.7, e.g. `*̂₁ᵃ′` is an operator with the same precedence as `*`.

Similarly for `+` etcetera.

(It seems a lot clearer to me to write `a *ₘ b` than `a `mytimes` b` for an operator that is kind of like `*`.)

---

_[View the full topic](https://discourse.julialang.org/t/on-adjoints-and-custom-postfix-and-infix-operators/12863)._
