Unit Test Statically Typed Programs
I've helped some younger guys (who use Python and Ruby almost exclusively) write some C++ code. They do lots of unit testing on their Ruby/Python code. They complain that I don't unit test C++.
My C++ code is small and works as expected. It's compiled with all the compiler checks enabled (-Wall -Wextra -Weffc++) so any slight error is caught and fixed at compile time. I don't do any casting and I use a const wherever I can and all the data structures are STL.
So my question to HN... do you guys unit check C and C++ code? In my mind, the compiler (written by a lot of super smart guys) is my unit tester and the only reason the young guys need to do this sort of thing is because they're using dynamically typed (thus more error prone) languages.
I wanted to do a sanity check with HN though. What do you guys think?
3 comments
[ 3.5 ms ] story [ 17.3 ms ] thread"all the compiler checks enabled"