How to overload operators and their doc bindings

No, because Main.(x) denotes a “dot call”, equivalent to broadcast(Main, x).

It’s certainly true that there are many different syntactic styles Julia could have chosen. We could have chosen to be more like Python, or more like Rust, or more like Lisp. But the fact of the matter is we have chosen a syntax, and it’s all inter-related — you can’t just change one aspect without changing everything else. Nor is Julia at the stage of development where we are changing basic syntactic structures (see PSA: Julia is not at that stage of development anymore), and any new syntax must be added in a carefully nonbreaking way and to solve a real problem, not just because we want a slightly different spelling.

(You may think Main.:foo is not “sensible”, but in fact this is very consistent with Julia’s metaprogramming facilities, which require a way of “quoting” symbols.)

2 Likes