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

"Despite the very poor example set by C and C++, there is no inherent connection between undefined behavior (UB) and unsafe programming. Rather, UB simply reflects a refusal to systematically trap program errors at one particular level of the system: the responsibility for avoiding these errors is delegated to a higher level of abstraction."

"Swift and Rust are compiled to LLVM IR; some of their safety guarantees are enforced by dynamic checks in the emitted code, other guarantees are made through type checking and have no representation at the LLVM level. Even C can be used safely if some tool in the development environment ensures--either statically or dynamically--that it will not execute UB."

Does this imply that with sufficiently advanced static analysis tools almost any programming language can be made safe?



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

Search: