DEV Community


Discussion on: Comments Are The Only "Code Smell"

pjotre86 profile image
pjotre86 • Edited

Hard to disagree. Uncle Bob proclaimed this more than 10 years ago already 🎅

However there's one use case for comments I'd like to add:
When you have to deal/integrate with/extend legacy code and/or 3rd party libraries.
This often puts you in a spot where you can't write code which is easy to read and understand anymore no matter how hard you try to encapsulate it. Comments as a last resort so to say...

bytebodger profile image