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.’ (Rob Pike)
- `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.’ (Rob Pike)
Copyright © 1998, Tom Christiansen All rights reserved.
Something wrong with this article? Help us out by opening an issue or pull request on GitHub