Skip to content

readline.question #4833

Description

@benjamingr

So, I found readline.question today, and it looks really odd.

First, it doesn't follow the (err, data) nodeback convention at all (where do errors go?).
Second, it doesn't really feel like something that should be in core.

Should it be soft-deprecated?
Should it be "fixed" to conform to the node-back convention (not very likely)?

Activity

  1. added
    readlineIssues and PRs related to the built-in readline module.
    on Jan 24, 2016
  2. ChALkeR commented on Jan 24, 2016

    @ChALkeR
    Member

    It's used by about 0.3% of modules, including babel, pm2, webdriverio, replace, atom-package-manager.

  3. benjamingr commented on Jan 24, 2016

    @benjamingr
    MemberAuthor

    Yes, it's definitely used in quite a bit of code. Still, the inconsistency bugs me. I wonder if soft deprecation would work here if it's even something we're interested in.

  4. Fishrock123 commented on Jan 24, 2016

    @Fishrock123
    Contributor

    I've used it and it is useful. It is a bit odd I suppose, but you would never catch an error there afaik. It simply doesn't make any sense to me why there would ever be one.

  5. benjamingr commented on Jan 25, 2016

    @benjamingr
    MemberAuthor

    Well, even a method that doesn't raise errors (and whether or not readline can/should do that is debateable) - it should have an (err, data) signature for consistency.

    I admit it's useful and I'm not for removing it.

    Maybe put a big note in the docs saying it's inconsistenct with other node style APIs?

  6. Fishrock123 commented on Jan 25, 2016

    @Fishrock123
    Contributor

    I wouldn't be against putting a note, but I don't think it should actually have an errback, since it would always be undefined.

  7. abdulhannanali commented on Jan 27, 2016

    @abdulhannanali

    Is there a synchronous substitute of readline.question

  8. added a commit that references this issue on Jun 6, 2016
  9. abdulhannanali commented on Jun 7, 2016

    @abdulhannanali

    Good job closing this!

  10. added
    docIssues and PRs related to Node.js documentation.
    and removed
    docIssues and PRs related to Node.js documentation.
    on Dec 1, 2016
  11. added a commit that references this issue on Jul 27, 2026
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

    docIssues and PRs related to Node.js documentation.readlineIssues and PRs related to the built-in readline module.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions