Skip to content

Semantics of length and size switched? #23

Description

@wherget

I was trying to use this for backing a d3.js graph, and after a bit of debugging found that (to me) it looks like the semantics of .length and .size are the wrong way around. That is to say, for a "plain" JS Array, .length is (usually, except for some edge cases) the number of elements in the array, what is CBuffer.size here.

For using CBuffer as a "drop-in" replacement for a plain old Array, exchanging these meanings might be helpful. What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions