New ES6 strawman: Array.prototype.fill and Array.prototype.move
allen at wirfs-brock.com
Sun Jun 23 14:01:37 PDT 2013
There isn't one. It came up in discussions with Kenneth Russell and Dave and I agreed that we would try to get it into ES6 rather than having him invent something.
On Jun 23, 2013, at 1:11 PM, Brendan Eich wrote:
> Axel Rauschmayer wrote:
>> On Jun 23, 2013, at 21:21 , Allen Wirfs-Brock <allen at wirfs-brock.com <mailto:allen at wirfs-brock.com>> wrote:
>>> See http://wiki.ecmascript.org/doku.php?id=strawman:array_fill_and_move for a strawman proposal for two new Array methods. These are proposed for inclusion in ES6.
>> 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.).
> Allen: where is the Khronos draft spec on move? I can't find it.
>> Dr. Axel Rauschmayer
>> axel at rauschma.de <mailto:axel at rauschma.de>
>> home: rauschma.de <http://rauschma.de>
>> twitter: twitter.com/rauschma <http://twitter.com/rauschma>
>> blog: 2ality.com <http://2ality.com>
>> es-discuss mailing list
>> es-discuss at mozilla.org
More information about the es-discuss