Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Was javadoc the first tool that encouraged, almost forced, the redundant comment?

Instead of comments just to make clearer the intent of the code, now we had highly repetitive comments in boilerplate format that would add nothing to already clear code.

As comments went from being one thing "make intent clear, shout why something happens" to multiple things "generate docs" + "pass commit linting"... the value of a comment diminished fast and so it isn't surprising to me that syntax highlighting downplays the comment.

What is surprising is that we haven't yet defined multiple types of comment: 1 for documentation, 1 for clarity. Or that we haven't determined the context of a comment and chosen to highlight depending on that context.



>What is surprising is ... we haven't determined the context of a comment and chosen to highlight depending on that context.

My syntax highlighter does do this, for every language I can think of - and so does essentially every code editor software I can remember using. The most popular editors even have the power to collapse doc comments, and I believe some do by default.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: