mattkretz / std-simd-feedback

Feedback from simd in the Parallelism TS 2
0 stars 0 forks source link

concat or join? #29

Open boblytton opened 1 year ago

boblytton commented 1 year ago

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:

mattkretz commented 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.

boblytton commented 1 year ago

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.

mattkretz commented 1 year ago

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.