Hacker News new | past | comments | ask | show | jobs | submit login

Yes memory safe languages would absolutely help here. In Rust you would get a compile time error about the destination variable not living long enough.

This sort of stuff is why any productivity arguments for C++ over Rust are bullshit. Sure you spend a little more time writing lifetime annotations, but in return you avoid spending 5 days debugging one memory corruption bug.




This is not a memory corruption bug. It is an undefined behavior bug and it also affected Rust until 1.81.0 as per comments from others:

https://blog.rust-lang.org/2024/09/05/Rust-1.81.0.html#abort...




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: