News for hackers. Stuff that matters.
Re:Node v7.5.0 Released by vkjv on Friday February 03, 2017 @08:08AM (#13559515)
In my opinion, these are the major ones:

1. Promises are a value. They can be passed to other functions. This simplifies a lot of control flow.

2. The `.then` method on a promise is similar to `flatMap` in other languages / libs. The next chain will wait for any nested promises to complete. This flattens callbacks so you can see the flow instead of the pyramid of doom.

3. Native promises include a bit of sugar, such as Promise.all. You need a library to do this with callbacks.

4. Promises are the backbone of async/await. You need them to use it.

Example:

    await const [a, b] = Promise.all([getA(), getB()]);
Re:Node v7.5.0 Released by jcheng on Friday February 03, 2017 @10:58AM (#13560669)
5. Error handling and even successful termination is very, very easy to get wrong with nested callbacks (forgetting to call a callback, or forgetting to catch unexpected exceptions and pass them to the callback, means the function never returns at best or brings down the whole process at worst). Promises make this much easier by automatically propagating errors for you down the promise chain (though you or your caller do still need to handle the error at the end of the chain).
Re:Node v7.5.0 Released by rictic on Friday February 03, 2017 @12:14PM (#13561345)
Nit, but await is an operator, not an annotation on a statement. So that should be written as:

    const [a, b] = await Promise.all([getA(), getB()]);