22:06
<ljharb>
bakkot: the more i convert codebases to use iterator helpers, the more i dearly need .concat - that follow-on can't come fast enough
22:06
<bakkot>
if you have use cases that will help!
22:07
<bakkot>
I suspect the committee will not need much convincing but it's always good to collect them
22:10
<ljharb>
i mean, basically every time i have a chain of transformations that starts in an iterable, and i want to manually add in some hardcoded cases. concretely, in eslint-plugin-jsx-a11y, there's a few places where we need to hardcode specific aria role values, so we need to concat them onto the Set provided by an aria library as part of the transformation chain
22:11
<ljharb>
also, i build up arrays/iterators of test cases, and then i want to combine the different conceptual streams of test cases, i have to reify them each into an array before concatenating
22:12
<ljharb>
(so specifically, i need the ability to concatenate both single values as well as iterators of values, which is exactly where concat is most useful for arrays/scalars)
22:36
<bakkot>
ah, that specific behavior is... not one I would carry over if we can avoid it
22:36
<bakkot>
we'll see though
22:36
<bakkot>
it's a little trickier for iterators than for arrays because a lot more things are iterable than concat-spreadable
22:40
<bakkot>
my inclination would be to go with the same thing as Iterator.prototype.flatMap, i.e. iterable (except strings) or iterator, otherwise error
22:40
<bakkot>
so you'd have to .concat([x]) to do a single item