On Slack I said:
join
is occasionally frustrating because Base definesjoin
for 1 to 3Any
args, so it's hard to extend without giving the user some confusion, and it's a common operation for a varying number of arguments (e.g., join N tables a la SQL)
I think join is not specific enough of a name to describe the operation implemented generically in Base
And @StefanKarpinski suggested opening an issue.
Another issue with join
is that since it's extremely generic, it actually does apply to almost every type. So it's conceivable that you might want to join
some databases but also separately stringjoin
them for printing or something.
A somewhat-related discussion was had here: https://github.com/JuliaLang/julia/issues/26617
Why don't we start by specifying the types of delim
and last
arguments?
Is this open to newer contributors? I'd love to take it on! I'll be standing by in case it needs any discussion.
Julia is a very open community, but unfortunately there is only so much we can do about this for now.
If you are interested in this very issue, it may be useful to add a cross-reference to another "word choice" issue.
join_table
seems more doable an approach given that join
is used very widely.
Other possibility : remove join as a named function, but keep it as an efficient implementation by specializing mapreduce
using Test
# join(strings) = sprint(join, strings) @ julia v1.3
Base.mapreduce(::typeof(string), op, strings::AbstractArray) = sprint(op, strings)
@test mapreduce(string, join, [1:3...]) == "123"
@test mapreduce(string, (io,s)->join(io,s,";"), [1:3...]) == "1;2;3"
Most helpful comment
join_table
seems more doable an approach given thatjoin
is used very widely.