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

Why have I never thought of that?


I do the same, even in languages without a preprocessor.

You can just use a life if-else, most compilers will optimize the test-on-a-constant away. Even when the code is kept in, I doubt it will have a major performance impact during testing in most cases.




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

Search: