New ES6 strawman: Array.prototype.fill and Array.prototype.move
brendan at mozilla.com
Sun Jun 23 13:36:03 PDT 2013
Allen Wirfs-Brock wrote:
> for a strawman proposal for two new Array methods. These are proposed
> for inclusion in ES6.
I updated the wiki:
Q: Does anyone know of a rationale for why (start, end) might be a
better design pattern than (start, count) for such operation?
A: Array.prototype.slice uses (start, end) where end is a fencepost to
facilitate looping over half-open ranges within a larger range. Spec’ing
count requires subtracting next_start - end, gratuitously. Also,
consistency with slice and range APIs matters. This should be considered
carefully in the design.
— /Brendan Eich
More information about the es-discuss