4 ms·
I'm looking forward to the improvements to the ergonomics of testing as programming languages mature. For example I really like how Rust has allowed the integra
by Decabytes 5y ago
I'm looking forward to the improvements to the ergonomics of testing as programming languages mature. For example I really like how Rust has allowed the integration of runnable code into the docstrings of functions to combat documentation being out of date with the current iteration of the function.
Ultimately though, I believe any amount of testing that can be pushed into the compiler/virtualmachine of the language is the most effective. I've learned that people (myself included) don't always code as robustly as they could (either through inexperience, negligence, time/market constraints etc). I can't count how many times I've told myself, I'll go back and write a test for this later.
- rectang 5y agoRust's implementation of doc tests and its integration of doc tests into standard workflows is praiseworthy. At the same time, we need to acknowledge that doc tests were pioneered elsewhere and have existed in many other languages for a long time. Like many things in Rust, the innovation is not so much at the computer science conceptual level, but in designing institutions, communities, and processes that allow for integrating the best ideas in a controlled manner.
- Decabytes 5y ago> At the same time, we need to acknowledge that doc tests were pioneered elsewhere and have existed in many other languages for a long time. I agree. I understand that a lot of people talk about Rust as if everything it does is novel, when it is really a culmination and execution of a lot of good ideas (Which tbf is what most good things are anyway). And the fact that many people's introduction to Rust come from books written by the developers means that even beginners will be exposed to these features early on
- david2ndaccount 5y agoPython has had doctest[1] in its standard library for a very long time. The wikipedia page[2] references this post[3] of Tim Peters talking about it in 1999! 1. https://docs.python.org/3/library/doctest.html https://docs.python.org/3/library/doctest.html 2. https://en.wikipedia.org/wiki/Doctest https://en.wikipedia.org/wiki/Doctest 3. https://groups.google.com/group/comp.lang.python/msg/1c57cfb7b3772763 https://groups.google.com/group/comp.lang.python/msg/1c57cfb...
- Decabytes 5y agoI've been using Python for years and was not aware of this feature