|
|
|
|
|
by ubuntuftw
3537 days ago
|
|
I'm no stranger to Node.js. We use it in production for all of our real-time/async stuff. The new ES6 features async/await are cool and all, but it's a late addition to a language that was clearly not designed for synchronous code. If you use them, you just end up with bloated, complex code. For an API, I think Node.js is the wrong tool for the job, personally. PHP is a better fit, IMHO. For real-time/async stuff, it's a different story. |
|
You only add '*' and 'yield' (or 'await' and 'async') and write like any synchronous code once you wrap it under co module and such.
async/await is for ES7. TypeScript already has an implemention though.