Hacker News new | ask | show | jobs
by Matthias247 3314 days ago
I think the claim was: One async function (which of course returns a Promise under the hood) forces all surrounding functions to be also asynchronous (return a promise). Of course you could start an async operation from any function -> Just call the async function and ignore the result. But in order to do something with the result and return a transformed version of it the surrounding function has to be async (return a Promise, accept callbacks, etc) too.

Maybe the confusion was the async here has two meanings:

1. asynchronous in general, which means it doesn't return a result immediately, but returns it through a Promise which is fulfilled later or a callback.

2. Using the async/await syntax. As we all agree this one is just sugar around Promises.