Consider creating a module A
with a function called split
inside of it. Then I can call the function as A.split
without clobbering or extending Base.split
, so it could have a different meaning. Within A
I would have to qualify any use of Base.split
, but otherwise it seems pretty reasonable to me.
module A
split(x,y) = "A split"
end
A.split("abc","cdef")
The following gives me pause, every module has Base.split
available at all times
julia> module B
end
B
julia> B.split("abc","b")
2-element Array{SubString{String},1}:
"a"
"c"
Anybody have any thoughts on re-using base function names inside a module? I was trying to avoid something like this, where I essentially repeat the module name:
module C
csplit(x,y) = "c split"
end