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

I don't understand why someone would do this nested comments thing. This is what macro block are for...

And tests need to be separated from the code. Hopefully using a test framework.

If your code changes depending on if it is in 'test mode' or not (which is what is proposed), then the test code is not the same as the production code, i.e. the production code is not tested. I'm not just talking about timing issues - extra variable names and objects will be in scope in 'test mode', and might logically change the behavior of the program.



* not all languages have macros * you don't use test frameworks for enabling and disabling code inline while you're developing

Please read the protip, understand my intention (keyword TRICK) and have a delightful cup of coffee. You've earned it.


Welcome to Hacker News. :-)

> understand my intention

We don't do that here. However, we do have an unparalleled menu of pedantic critique, edge case obsession, and a wonderful sauce made from insanely perfect standards.




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

Search: