We already have a useful
typedArray.set(array, offset = 0), but I've run into quite a few glitches with that, cases where an end index would be incredibly useful and cases where I don't want to start at the beginning of
array. However, that's just a minor nice-to-have to avoid an allocation. The bigger issue I've been running into is that there's no equivalent with arrays, and I'd say at least 1% of all my
for loops that require indices (1 in 100 is a lot) could be outright replaced with this, with another of 2-3% having at least some use for it. (In peformance-critical code, this number ends up even more inflated, with as much as 5% of all loops being literally just this.)
Array.prototype.copyWithin already exists, so I suspect it's as much a spec omission as anything, and in particular, the parameter order and handling proposed there is the same as that method. (The general intuition with my proposal is that
array.copyWithin(...args) should be equivalent to
array.set(array, ...args) in most cases.)
Seeking champion(s) and/or other involvement. No polyfills (yet), of course, though polyfills would be very straightforward to write.