In my module
A I have defined
+ for symbols.
julia> module A import Base: + +(x::Symbol, y::Symbol) = :(+($x, $y)) end A
I would like to use it in some module
B, but since adding 2 symbols might be error prone, I don’t want it to be exported to other modules. Yet, since
+(::Symbol, ::Symbol) extends
Base.+, it becomes automatically available to all modules whenever
A is loaded. E.g. in REPL /
julia> :x + :y :(x + y)
Is there a way to define
+(::Symbol, ::Symbol), but keep it private unless explicitly imported?