Open earthboundkid opened 2 hours ago
Related Issues and Documentation
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Do you imagine that it would collect all the items from the sequence first to figure out the total length of the final string before concatenating them?
I imagine it would just use a strings.Builder and opt into whatever the default buffer there is. Maybe there could be optimization to use a slice for sequences shorter than N.
Proposal Details
61901 added SplitSeq and friends to bytes, but nothing for joining. Right now you have to do slices.Collect first or use a bytes.Buffer/strings.Builder, which feels unfortunate. I propose to add
strings.JoinSeq(seq iter.Seq[string], sep string) string
and the bytes equivalent as well.