Comment by mrkeen
9 months ago
With modern languages that take safety more seriously, it's a lot easier to spot places where the code 'goes wrong'.
In an older language, you have nothing to tell you whether you're about to dereference null:
foo.bar.baz = ...;
Even if you've coded it 100% correctly, that line of code still looks the same as code which will segfault. You need to look elsewhere in codebase to make sure the right instructions populated those fields at the right time. If I'm scrolling past, I'll slow down everytime to think "Hey, will that crash?"
Compare that with more safety focused languages where you can see the null-dereferences on the page. Unwrap() or whatever it is in Rust. Since they're visually present, you can code fast by using the unsafe variants, come back later, and know that they won't be missed in a code review. You can literally grep for unsafe code to refactor.
No comments yet
Contribute on Hacker News ↗