-
Notifications
You must be signed in to change notification settings - Fork 0
Description
From #1:
Naming Bikeshed
Is
concatthe best name? Who knows!? Let's figure out the right name for the bikeshed. Other options could includejoin(...)given the possible semantic similarity to joining strings.. but that seems weird, especially given that%TypedArray%is itself an iterable and we may be having ajoin(...)API for Iterables in general.New API or existing?
We could, at least theoretically, modify
%TypedArray%.fromto support this case by allowingsourceto be an iterable of%TypedArray%instead of an iterable of elements. That seems a bit problematic for several reasons. One, it's confusing. Two, it's not discoverable for user code and is likely more difficult to polyfill.
My concern with concat is that it's currently a prototype method on strings, which makes it have slightly different semantics.
One suggestion: fromChunks to avoid overloading from.
This might also help avoid conflicts with the Node.js concat if we want a slightly different arguments shape.