News for hackers. Stuff that matters.
Re:Kaboom – JavaScript game programming library and environment by z3t4 on Tuesday April 13, 2021 @07:18AM (#26790732)
JavaScript itself is not async. It's the programs/engines that runs the scripting language that have decided to make it async with callbacks. For example Microsoft JS is not async. * ES2022? do have some garbage collection hook that uses a callback, so if that makes it into the standard you could say that JS/ES is async. JavaScript itself does not (yet) have any async functions.
Re:Kaboom – JavaScript game programming library and environment by zzbzq on Tuesday April 13, 2021 @09:17AM (#26791734)
'Async' here refers not only to the keyword but also to what is achieved, in classic javascript, through callback functions
Re:Kaboom – JavaScript game programming library and environment by z3t4 on Tuesday April 13, 2021 @09:31AM (#26791878)
Even though there is the async keyword and Promise() there are no async functions nor callbacks in JavaScript itself. For example setInterval and setTimeout is not part of the language and needs to be implemented by the runtime/program that runs the JavaScript.