Open boblytton opened 1 year ago
This is purely a naming question, right? I find join to be less clear about the exact operation. A SQL join is not a concatenation either.
append
sounds like a modifying operation. I.e. x.append(y)
modifies x to have y appended to it.operator+=
and operator+
already have a meaning for simd
strcat
seems like our best precedent: it takes two strings of immutable length and has to produce a new, larger string, which it returns.This is purely a naming question, right? Yes I raised it to be considered (but expect it to be rejected). I would have liked more consistency, but it seems this is not one of those places.
I'm not sure what you want me to do now? Do you want me to raise this question in the paper? I'd prefer you write a short paper on the topic with your thoughts on naming.
I did prefer 'join' but now...
The std libraries use multiple names for concatenating two objects into one, suggesting the result e.g. append, operator+=, join, operator+, (and strcat). Split and join are used for ranges and views (threads use join too). I can't think of any occurrences of 'concat' (merge, append, insert etc are used).
On the surface split and join make a nice pair. However, join tend to be used where there is more to joining than simply concatenating viz: