Skip to content

Remove buffer.get and buffer.set #4587

Description

@feross

These have been deprecated since Apr 27, 2013, and the plan was to remove them in "node v0.13", according to the comments.

buffer.get(index) is superseded by buffer[index].

buffer.set(index, value) is superseded by buffer[index] = value.

I haven't seen these used in real code, ever. They also have never been documented at any point in node's history, according to the git commit history for doc/api/buffer.markdown.

I think it is safe to finally remove these.

Thoughts?

Activity

  1. feross commented on Jan 8, 2016

    @feross
    ContributorAuthor

    Another advantage of removing these is that they'll stop shadowing the underlying TypedArray.prototype.set function.

  2. jasnell commented on Jan 8, 2016

    @jasnell
    Member
  3. changed the title [-]Deprecate `buffer.get` and `buffer.set`[/-] [+]Remove `buffer.get` and `buffer.set`[/+] on Jan 8, 2016
  4. trevnorris commented on Jan 8, 2016

    @trevnorris
    Contributor

    Can be removed whenever. It never gets in the way of anything, so I keep forgetting about them. Wouldn't even say it's a major change. Not documented and have been fully deprecated going on 3 years (as @feross mentioned).

  5. added
    bufferIssues and PRs related to the buffer subsystem.
    on Jan 8, 2016
  6. feross commented on Jan 8, 2016

    @feross
    ContributorAuthor

    @trevnorris Okay, PR sent: #4594

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bufferIssues and PRs related to the buffer subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions