I'm surprised that the signature for
joined isn't using the argument label
Currently we have:
[a, b, c].joined(separator: "\n")
[a, b, c].joined(by: "\n")
The latter is more readable, and is what I'd expect given the guidelines:
I agree that
joined(separator: "\n") is actually not as nicely named as it should be.
However (and forgive me, I am not a native speaker) wouldn't
joined(by:) mean that something is added to an existing group (like: "later we were joined by my friend Peter") and the correct term would actually be
Good point! Now you mention that,
by does not sound great. Perhaps
separator is best after all... as it's clear what the parameter is used for. Reading
by makes the assumption the user knows how the parameter is used, where
separator doesn't read well, but at least it's explicit.