In C++, = default and {} are not the same constructor (opens external site)
View full thread · View on Hacker News
To get push notifications on iPhone or iPad, add Hack and Chat to your Home Screen: tap Share → Add to Home Screen, then open the installed app and enable push in Settings.
View full thread · View on Hacker News
Well, that's the thing about rust and async. It's far more restrictive (necessarily) than the bounds of safety. The hard problem rust runs into is that async functions can be executed outside of lexical and the lifetime tracking of the rust language. To be absolutely safe, rust ends up needing to assume that async can be executed with no respect to the surrounding lifetimes.
Rust would really benefit from something like structured concurrency in terms of the lifetimes of async functions.
Replies (1)
I obviously was not talking about things illegal in safe Rust, which are actually safe, e.g. you cannot send types which are not allowed to be moved across threads across threads in C++ either.
> To be absolutely safe, rust ends up needing to assume that async can be executed with no respect to the surrounding lifetimes.
seems to work with surrounding life times?
https://play.rust-lang.org/?version=stable&mode=debug&editio...