News for hackers. Stuff that matters.
Re:C++ the Good Parts (2014) by fctorial on Thursday October 01, 2020 @07:35AM (#24649723)
rust provides destructor functionality with drop trait:

https://doc.rust-lang.org/beta/std/ops/trait.Drop.html

Re:C++ the Good Parts (2014) by cztomsik on Thursday October 01, 2020 @11:49AM (#24652297)
yes, but rust doesn't have exceptions so it's a bit more limited
Re:C++ the Good Parts (2014) by Rusky on Thursday October 01, 2020 @12:41PM (#24653085)
What? Rust has both early return and unwinding, which interact with destructors the same way.

Further, Rust has destructive move, making drop even more flexible.