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

Because the standard library has reference counting with no static checking to avoid cycles, and it was decided to also have safe mem::forget since it can be (mostly) emulated with the former.

It has no such static checking because it was deemed to reduce expressiveness, while not impacting memory safety.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: