Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Possible swap the order of the resolve and reject arguments to be consistent with ES6 Promises #17

Closed
L8D opened this issue Oct 16, 2014 · 2 comments

Comments

@L8D
Copy link
Member

L8D commented Oct 16, 2014

i.e. make them be:

function read(path) {
  return new Future(function(resolve, reject) {
    fs.readFile(path, function(err, data) {
      if (err) {
        reject(err);
      } else {
        resolve(data);
      }
    });
  });
}

http://www.2ality.com/2014/10/es6-promises-api.html

@robotlolita
Copy link
Member

Hmm, this would be a breaking change without much benefits. I think we're stuck with this order because legacy and history =/

@L8D
Copy link
Member Author

L8D commented Oct 16, 2014

But it's only at version 0.4! Oh wait... nvm.

@L8D L8D closed this as completed Oct 16, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants