Skip to main content


Showing posts from July, 2013

Comments Should be Meaningless

This is something of a counterintuitive idea:
Comments should be meaningless
What, I hear you ask, are you talking about? Comments should communicate to the reader! At least that is the received conventional wisdom handed does over the last few centuries (decades at least).

Well, certainly, if you are programming in Assembler, or C, then yes, comments should convey meaning
because the programming language cannot
So, conversely, as a comment on the programming language itself, anytime the programmer feels the imperative to write a meaningful comment it is because the language is not able to convey the intent of the programmer.

I have already noticed that I write far fewer comments in my Java programs than in my C programs.  That is because Java is able to capture more of my meaning and comments would be superfluous.

So, if a language were able to capture all of my intentions, I would never need to write a comment.

Hence the title of this blog.