4 ms·
Putting valgrind into the stdlib is really clever, and also, I like memory safety being the carrot to get you to write tests. I worry having a 'safe' system li
by dnautics 5y ago
Putting valgrind into the stdlib is really clever, and also, I like memory safety being the carrot to get you to write tests. I worry having a 'safe' system like rust sometimes causes very smart (TM) developers, especially less experienced ones, to be complacent and write less tests.
- nicoburns 5y agoWriting fewer tests is somewhat justified when you can encode invariants in the type system. It depends on the level of reliability you require of course. But my Rust code without tests has been comparably reliable to my code in other lanaguages eith tests.
- dnautics 5y agoNo tests? How do you refactor while ensuring your business logic invariants?
- pjmlp 5y agoExcept I can already do that in C++. https://devblogs.microsoft.com/cppblog/new-static-analysis-rule-for-bounds-checking/ https://devblogs.microsoft.com/cppblog/new-static-analysis-r... https://devblogs.microsoft.com/cppblog/finding-bugs-with-addresssanitizer-patterns-from-open-source-projects/ https://devblogs.microsoft.com/cppblog/finding-bugs-with-add... https://docs.microsoft.com/en-us/cpp/code-quality/using-sal-annotations-to-reduce-c-cpp-code-defects?view=msvc-160 https://docs.microsoft.com/en-us/cpp/code-quality/using-sal-... https://docs.microsoft.com/en-us/visualstudio/debugger/how-to-use-native-run-time-checks?view=vs-2019 https://docs.microsoft.com/en-us/visualstudio/debugger/how-t... No need to switch languages with a lesser eco-system, just learning to turn on the compiler switches that are already there.