Anybody who has used node.js for more than 10 minutes knows that the callback style makes code completely unreadable. Unreadable code is a breeding ground for bugs.
Back in 2009, that was an acceptable trade-off, because there were advantages to JavaScript, such as sharing code between client and server.
Now we have promises and we don't have to put up with callbacks anymore (eventually!). FWIW async/await is the syntax, and promises are the runtime, they are not competing features.
Back in 2009, that was an acceptable trade-off, because there were advantages to JavaScript, such as sharing code between client and server.
Now we have promises and we don't have to put up with callbacks anymore (eventually!). FWIW async/await is the syntax, and promises are the runtime, they are not competing features.