I’m guessing it has to do with a parsing ambiguity related to expression interpolation, or something like that, but I can’t point to exactly what the issue is. Does anyone know why binary $ is excluded from broadcasting?
The exceptions are operators with very special syntactic meanings, like $ and ||. (Some of these could be allowed, but I wanted to be conservative to start with).
Yeah, the meaning of $ is heavily overloaded in that case, but it could be nice for some things, like as a function application operator, which is how $ is used in Haskell and in this Julia package:
I had a use case in mind similar to function application.
I assume that $ works this way to mirror :, which is also a syntactic operator in prefix form, but a function operator in infix form. Moreover, : cannot be broadcasted either.
(I don’t like it either )
Edit: To add to this, the exact ambiguities are the following:
julia> p = :prop; :(obj.$p) # Not broadcasting, but interpolation
:(obj.prop)
julia> julia> :(a.:b) == :(a.b) # not broadcasting either
true