Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you want to write the history of Python async things in order, you'll need to put Twisted in many more of the places: it was callbacks only in the very beginning, then worked via generators, and once Python added async syntax used that. "Twisted (callbacks)" is a simplification that ignores the influence Twisted has had even on non-Python ecosystems; Deferreds have been imitated all over the place.


Before callbacks, there were function pointers and there was no Garbage Collection; And before function pointers, there were JMPs, trampolines, and labels in ASM.

I don't share any reverence for the Twisted callback patterns that AJAX also implements. And, the article isn't about callbacks.

Promises in JS have a separate success and error functions. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guid...

MDN > Async function: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... :

> The async function declaration creates a binding of a new async function to a given name.

> The await keyword is permitted within the function body, enabling asynchronous, promise-based behavior to be written in a cleaner style and avoiding the need to explicitly configure promise chains




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: