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

> A debugging switch that, when enabled, turns a valid program into an invalid one is madness.

You mean like gcc's -Werror? Or enabling asserts? Both of those seem useful to me.



-Werror isn't a "debugging switch". It should be enabled at all times, for development builds and production builds.

If compilation warnings are given, then the responsible thing to do is to assume the program is invalid, at least in certain situations. Fix the code, avoid the warnings completely, and that's that.

There are remarkably few cases where compilation warnings can or should be ignored.


Since the compiler didn't succeed at compilation, no program was generated at all. Removing asserts is really compiling a different program.




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

Search: