4 ms·
Btw, the argument "If it compiles, I don't need to be afraid about run time errors anymore" is also pretty foreign to me. I just run my code in small batches w
by simondanisch 7y ago
Btw, the argument "If it compiles, I don't need to be afraid about run time errors anymore" is also pretty foreign to me.
I just run my code in small batches while developing it, so at every point I already know that it works. This helps writing code that nicely separates into small chunks of functionality, and you basically automatically write tests for it while at it.
This is especially nice when refactoring a large code base. I can already run many small and usable tests in the middle of a refactor (while the program wouldn't even compile in a static language).
In my experience, this greatly helps to improve the quality of the refactor, and makes it much easier to see problems in your refactoring approach very early on.
In a static language, you'd only get these crucial insights after you're done with fixing all compilation errors - which is usually when you're already done with the whole refactor... and after that, you might still have lots of errors in it that you can only find with real tests ;)