Hacker News new | ask | show | jobs
by jkarneges 871 days ago
> rust async seems to be a terrible design blunder [...] that could destroy the community and render the language worthless

What an extreme take!

Async Rust as-it-is makes perfect sense for Rust's primary audience: folks who desire control/performance enough that they would otherwise be using C/C++. To call async an "efficiency hack" is to underestimate how important that efficiency is to Rust's existence. If async didn't work the way it does, it wouldn't have gained traction within the Rust community (folks would have just ignored it and kept writing state machines by hand) and it wouldn't have been able to act as a draw for C/C++ developers. It's a killer feature, and has enabled the language to thrive.

Not only is it a killer feature, the way it is designed is the only way it could have been. See: https://without.boats/blog/why-async-rust/

1 comments

i'm not underestimating efficiency; i'm well aware that in many situations it's more important than correctness. but i think it's important to distinguish between decisions made for the sake of efficiency and decisions that tend to make your code more modular, flexible, comprehensible, verifiable, or maintainable. promises originated as a way to make highly concurrent code more modular, flexible, comprehensible, verifiable, and maintainable. halstead's futures did, too. so did rust itself

async in rust is the opposite, and to me it looks like such an expensive way to get that efficiency that it strongly undermines the reasons for adopting rust