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

It is also worth noting that theoreticals don't help such discussions either.

Yes, C programmers can do much more checks. The reality on the ground is -- they do not.

Forcing checks by the compiler seems to be the only historically proven method of making programmers pay more attention.

If you can go out there and make _all_ C code utilize best-in-class static checkers, by all means, go and do so. The world would be a much better place.



Correct. Any language with builtin bounds checking would work.


If your only criteria is "remove the buffer under- and over-flows", yes. IMO Rust helps with a few more things. Its strong static typing allows for certain gymnastics to make invalid states unrepresentable. Though in fairness, that is sometimes taken too far and makes the code hard to maintain.

Tradeoffs, as always.




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

Search: