You are right with some points but i still see it a bit different. I disagree with the statement "I don't think encouraging bad practices is a problem if the code will be deleted before being submitted.". The thing is the deadline just needs to be shifted a bit and suddenly you have to commit code in a hurry. There will always be the chance that you forget delete something. A great example is this one: https://arstechnica.com/gadgets/2021/03/buffer-overruns-lice... low level code with debugging printfs nearly made it into the freebsd kernel.
I mean everyone prints something for debugging purpouse from time to time, thats fine. but having a lib extra for that. i dont think thats a good idea. Logging frameworks also enable toggling if source expression is printed or not. So you can only show it if you give a --debug flag to your tool for example.
I mean everyone prints something for debugging purpouse from time to time, thats fine. but having a lib extra for that. i dont think thats a good idea. Logging frameworks also enable toggling if source expression is printed or not. So you can only show it if you give a --debug flag to your tool for example.