folktale / data.task

Migrating to https://github.com/origamitower/folktale
MIT License
425 stars 45 forks source link

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

Closed L8D closed 9 years ago

L8D commented 9 years ago

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 commented 9 years ago

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

L8D commented 9 years ago

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