Rust Project Goals: Immobile types and guaranteed destructors

20 points by noncrab


snej

I’m glad to see this, as I’ve been reading about async Rust (haven't done any concurrent programming in Rust yet) and it sounds like a bit of a mess, with more than one guide concluding something like:

Async Rust … comes at the cost of additional inconvenience and hazards. … I recommend using ordinary (synchronous) Rust, with multithreading where you need concurrency, unless you have a reason to do otherwise.

I’m struggling to understand why forget() is not unsafe. It breaks the contracts of anything using RAII, and in the case of futures it means an entire async call chain can just abort with no chance to clean up. That’s worse than a panic, where at least you have the option to run destructors. I really don’t fancy writing and debugging async code in such an environment…

accelbread

Reading the title, I was excited, but seems this doesnt enable linear types which are the blocker for me. Though immovable types seems a lot simpler than pin, which is quite nice. I'm skeptical about guaranteed destructors, but also dont really care, since if linear types are added I'm likely to just ban use of types with destructors in my codebases.