3 ms·
> "Async/await will land in Node with the next V8 update." You can actually try the async-await functionality with Node Current (7.2.1 as of this writing) by p
by franciscop 10y ago
> "Async/await will land in Node with the next V8 update."
You can actually try the async-await functionality with Node Current (7.2.1 as of this writing) by passing the flag --harmony-async-await:
node --harmony-async-await app.js
It will be available without flags in the LTS release in March (that is in 3 months). Say goodbye to Callback Hell, the future of Node.js is looking pretty good.
- wolfgang42 10y agoYes, but: > However, Node v7 is based on V8 54, whose async/await implementation has some bugs in it (including a nasty memory leak). I would not recommend using --harmony-async-await in production until upgrading to V8 55; the easiest way to achieve that would be to wait for Node 8. https://github.com/nodejs/promises/issues/4#issuecomment-254159118 https://github.com/nodejs/promises/issues/4#issuecomment-254...
- sscotth 10y agoHe did say to "try" it, you can use a flag. You should assume that any feature behind a flag should never be used in production. Also, Node v7 will likely get a semver-minor update with V8 55. So, simply waiting for v7.3 or v7.4 should be sufficient and it will be enabled by default. https://github.com/nodejs/node/pull/9618#issuecomment-264641321 https://github.com/nodejs/node/pull/9618#issuecomment-264641... Those who are sticking with the LTS release for production will need to wait until April/May 2017. March is overly optimistic by the OP as the currently scheduled date is 2017-04-30. https://github.com/nodejs/LTS https://github.com/nodejs/LTS
- franciscop 10y agoI said March because I read it somewhere. A couple of months further, it's going to be worth the wait anyway. And yeah, flags are pretty much "try it" territory, not "use it in production" territory.
- deleted 10y ago[deleted]