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

> But you have to do everything explicitly.

Sure, but in the common case, "everything" is just adding a simple attribute to your main() function (e.g. `#[tokyo::main]`), and adding the `async` keyword to functions that have stuff in them that need `.await`ing. That's... kinda it?

The only real difficulty I've run into is when I have multiple futures I need to wait on, since there are some fiddly bits to deal with (like using select!{} can cause you to lose data depending on what the underlying futures are doing).

Regardless, comparing Rust to Javascript is a bit weird; they are just not comparable languages with even remotely similar intended use cases.



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

Search: