New ES6 strawman: Array.prototype.fill and Array.prototype.move

Axel Rauschmayer axel at
Sun Jun 23 13:14:46 PDT 2013

>> Array.prototype.move = function move(target=0,source=0, count=this.length-source)
>> Is the case of moving trailing elements somewhere else very common? If not, then I’d define the parameters in this order: source, count, target.
>> Rationale: easier to memorize.
> No, assignment-expression LHS/RHS (target/source) order precedent wins for memorization (see Object.extend precedent, strcpy, memcpy, etc.).

That makes sense, thanks!

I was thinking System.arraycopy, which may not a good precedent:,%20int,%20java.lang.Object,%20int,%20int%29

Dr. Axel Rauschmayer
axel at


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list