loading...

re: Is Commenting Code that necessary? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: In my opinion, comments should not explain what the code does. There are a few reasons to use comments though: to express the developer's intent...
 

As always, there is an exception: regular expressions.

Of course, we could write 20+ lines of code to replace a 1-line regex and make it more readable, but sometimes a regex really is the best fit for a problem. The downside is that they tend to be as legible as ancient Egyptian hieroglyphics. So those I comment what they do.

code of conduct - report abuse