+ 4
What is the use of documentation comments
/** and */ what is this
1 Respuesta
+ 5
Comments shouldn't be the substitute for a way to explain poorly written code in English. Write well structured and readable code, and then use comments.
Some believe that code should be self-documenting and comments should be scarce. However, I have to disagree with it completely (It's my personal opinion). There is nothing wrong with using comments to explain complex algorithms, regex or scenarios where you have chosen one technique over other (for future reference) to solve the problem.
In most cases, use comments to explain 'why' rather than 'how' and you are good to go.