News for hackers. Stuff that matters.
Re:JavaScript Promises: There and back again by astrodust on Tuesday December 17, 2013 @05:55PM (#6924576)
That's a good pattern, but obnoxious to apply on large numbers of functions. If something just did this for you in advance, that'd be what I'm looking for.

Trouble is, NodeJS set a convention and now everyone adheres to it. I'm not complaining there's standards, in fact that's a good thing. Part of me is just disappointed that the promise standardization happened too late in the game for NodeJS to build around it.

Re:JavaScript Promises: There and back again by spion on Tuesday December 17, 2013 @07:23PM (#6924977)
It really isn't much of a problem. A lot of the time its as easy as replacing

  var lib = require('lib');
with (given var Promise = require('bluebird'))

  var lib = require('lib');
  Promise.promisifyAll(lib);
And in case of classes, you'd use promisifyAll on about 2-3 prototypes instead.
Re:JavaScript Promises: There and back again by kybernetikos on Wednesday December 18, 2013 @04:25AM (#6926619)
I assume that some future major revision of node will move its API across and that in the meantime, promise versions of core libraries will start appearing on npm.