How can an infix operator with subscript such as ⋆ₛ work?

Using ⋆ as an infix operator works in Julia. For example,
function ⋆(a, b)
a + b
end
works.
But,
function ⋆ₛ(a, b)
a + b
end
gives an error message
ERROR: syntax: expected “end” in definition of function “⋆”.

Is there a way to make ⋆ₛ work as a name of the function to be used as an infix operator?

Yep, but not until 0.7: https://github.com/JuliaLang/julia/pull/22089

1 Like

Thanks :slight_smile: