4 ms·
The problem with print statements is that you're now adding unnecessary code to the application that you then have to take out. How many of us have been lazy an
by jshowa3 8y ago
The problem with print statements is that you're now adding unnecessary code to the application that you then have to take out.
How many of us have been lazy and just left them in? I know I have.
Thus you violate KISS and add unnecessary complexity to code when you could've just used a debugger.
As for logs, those are a necessity and should be in every complex program not just because of exceptions, but because of program logic that you implement and want to know where you are, and were, while the program is in use.
- kevin_thibedeau 8y agoIt's not exactly challenging to have prints only show up in debug builds.
- Koshkin 8y agoYeah, but they're still in the code. Tracing is nice when it is a feature built into the language implementation (i.e. the compiler or the interpreter).