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

The compiler shouldn't rejected UB, it should define all behavior, and reject all code constructs that can't have behavior fully defined (like accessing raw pointers as arrays, so bounds- checking is impossible). It can throw an exception on null de-reference at runtime. That's slow, but safe.


Slow but safe is not why people choose C++ for their software.


There is a compiler option for that, just run javac alias instead of g++




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

Search: