logoalt Hacker News

embedding-shapeyesterday at 11:57 AM3 repliesview on HN

Neither are true, `std:fs::remove_dir_all("/home/user/homework")` will happily compile and run, no matter if that's what you wanted or not.

Rust programs can't know what you want to do, period.


Replies

qouteallyesterday at 2:10 PM

The better phrase is that "if it compiles, then many possible Heisenbugs vanish"

https://qouteall.fun/qouteall-blog/2025/How%20to%20Avoid%20F...

throwawayqqq11yesterday at 12:15 PM

They certainly know that you dont want to process garbage data from freed memory.

Soundness does not cover semantic correctness. Maybe you want to wipe $HOME.

show 1 reply
alkonautyesterday at 3:39 PM

"If it compiles, then only logical bugs will make it eat your homework"