Skip to content

Name bikeshed #5

@mhofman

Description

@mhofman

From #1:

Naming Bikeshed

Is concat the best name? Who knows!? Let's figure out the right name for the bikeshed. Other options could include join(...) given the possible semantic similarity to joining strings.. but that seems weird, especially given that %TypedArray% is itself an iterable and we may be having a join(...) API for Iterables in general.

New API or existing?

We could, at least theoretically, modify %TypedArray%.from to support this case by allowing source to be an iterable of %TypedArray% instead of an iterable of elements. That seems a bit problematic for several reasons. One, it's confusing. Two, it's not discoverable for user code and is likely more difficult to polyfill.

My concern with concat is that it's currently a prototype method on strings, which makes it have slightly different semantics.

One suggestion: fromChunks to avoid overloading from.

This might also help avoid conflicts with the Node.js concat if we want a slightly different arguments shape.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions