July notes: copySlice --> copyWithin ??

Anne van Kesteren annevk at annevk.nl
Wed Aug 14 02:29:18 PDT 2013

On Wed, Aug 14, 2013 at 2:50 AM, Brendan Eich <brendan at mozilla.com> wrote:
> I will try to avoid missing even a day of TC39, it clearly has taken some
> toll! ;-)
> Given the in-place |this|-mutating update done by copyWithin, I'm ok with
> the name. But it seems to suggest "within current [0, length) bounds" --
> i.e., no extension of the |this| arraylike. Yet it can of course extend.
> In contrast, "fill" takes optional slice parameters but has a short name.
> Perhaps we would be better with either
> copy : fill :: copySlice : fillSlice
> Thoughts? Naming is hard, let's not rush it. One more round of bikeshed
> paint-color debate!

FWIW, the reasoning against copySlice during the meeting was that the
name suggests a copy would be returned of the slice of the array,
which is not what it does. fillSlice seems to suggest you fill a slice
with an array passed as argument (rather than something taken from the


More information about the es-discuss mailing list