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

I used Python's Twisted framework back in 2008 or so. This is before any language had async / await keywords (of course, the concept was there, just not the syntax level support).

Twisted built async on top of Python's generator functions, as far as I understand. I see now that the Rust community talks about supporting generators, and I've wondered if Rust did things backwards. If Rust had received generators first, could async have been built on top of generators without async specific special syntax?



Rust had generators first and used them to experiment with async. They're still there, stuck in nightly/unstable.

https://doc.rust-lang.org/beta/unstable-book/language-featur...

I think that's because there was a huge demand for async specifically, and Rust could ship higher level async without solving all the design details of less desired generators first.


I didn't know that, thanks for telling me.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: