Hacker News new | ask | show | jobs
5 Reasons Why You Should Be Using Promises (blog.runnable.com)
3 points by sundip 3624 days ago
1 comments

Nice writeup, thanks for sharing!

I think .then((path) => { return fs.readFileAsync(path) }) should be written as.then(fs.readFileAsync). Wrapping a function in an anonymous function doesn't really add anything - even with nice arrow notation ;-).

Dr. Boolean wrote a nice piece on this practice in Javascript: https://drboolean.gitbooks.io/mostly-adequate-guide/content/...