4 ms·
Oh good point about the lock file, hadn't thought about that. Will there be a compelling reason to rewrite stuff using async/await? I get that it will be the ri
by s_c_r 7y ago
Oh good point about the lock file, hadn't thought about that. Will there be a compelling reason to rewrite stuff using async/await? I get that it will be the right way going forward but curious about the benefits for legacy stuff.
- steveklabnik 7y agoAsync/await makes code much nicer. For an example (though this post is old and so is a bit out of date) see here: http://aturon.github.io/tech/2018/04/24/async-borrowing/ http://aturon.github.io/tech/2018/04/24/async-borrowing/ That said, async/await produces stuff that implements std::future::Future. The existing async ecosystem was built around the futures crate. Once std future hits stable in the next release, the Futures crate will release a 0.3 version, which has compatibility stuff between the new futures and futures 0.1, so you can technically bridge between the two worlds. The benefit is basically "you won't make your users use a bridge between your code and the new stuff".
- s_c_r 7y agoThanks for the link! The async/await code is definitely easier to parse mentally. Look forward to the release.