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

In C++ projects you see the verbose version a lot, because it's much faster to set a breakpoint on a statement than on a conditional expression. It's really annoying to repeatedly stop debugging, add the redundant return statements, and sit through a recompile cycle just because `return expr` looks nicer than `if (expr) return true else return false`.


Alternatively, you could use a debugger that supports conditional breakpoints.


Cond breakpoints require the code breaking each time and evaluate the statement which makes it runs like snail.




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

Search: