Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Care to explain why? In Rust RAII works very well, and the common failure mode of RAII--use-after-free--is statically prevented by the borrow check.


Use-after-free is definitely the major footgun portion of RAII in C++ (in my experience) but seems to me like the same issue would be present in any non-GC'd language that offers a 'deferral' mechanism, asynchronous or not (unless it has ownership/borrow management like Rust as you point out).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: