Perl Style: The Art of Commenting Code
- Explain what the code does, don't just perl2englishify.
- Eschew gaudy block banners.
- Use comments in regexes with
- Comment entire blocks, not single lines.
- `Comments on data are usually much more helpful than on algorithms.'
- `Basically, avoid comments. If your code needs a comment to be
understood, it would be better to rewrite it so it's easier to understand.'
Forward to On the Naming of Names (Form)
Back to Defensive Programming
Up to index
Copyright © 1998, Tom Christiansen
All rights reserved.