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

Nothing about Rust async depends on closures or functions being first-class. It's literally just a state machine transformation.

But now that state data that previously lived on a nice last-in-first-out stack has a different lifetime. Since Rust fastidiously encodes lifetimes in the type system, using async can result in having more complicated types to talk about.

To me it's just the price that must be paid to use a language that doesn't constantly spill garbage everywhere, necessitating collection.



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

Search: