3 ms·
> Tests are useful, but the big reason that comments are useful is that they are co-located with the relevant code. That's a not-often-talked-about (that I see
by OJFord 5y ago
> Tests are useful, but the big reason that comments are useful is that they are co-located with the relevant code.
That's a not-often-talked-about (that I see anyway?) thing I really like about rust - I don't get to use it much, but when I do I think having 'doc tests' alongside comments heading a function and 'module tests' at the bottom of the same file is great.