4 ms·
I always use “what” comments for regular expressions, in addition I provide examples of before and after transformations so that future developers know immediat
by antonymoose 10mo ago
I always use “what” comments for regular expressions, in addition I provide examples of before and after transformations so that future developers know immediately what’s going on without having to first stop, context-switch, and decipher hieroglyphs.
- epgui 10mo agoThis is probably one of the best use cases for "what" comments... however in my opinion a much better way to go about this is to have example-based tests (and maybe a decent function name) serve as your documentation.