re: To Comment Or Not To Comment? VIEW POST

re: One should be able to completely re-implement the code in any language, given only the comments. Replace comments by functions' names and Id be o...

The exact line length really depends on things like language, editor, etc. Modern screens afford us more room to work with than back when "80" was the standard, even if your editor is only taking up half the window. I find 120 is usually good to start.

Also, as I said in the article, don't confuse the purpose of self-commenting code (function names being part of that) with comments. They work together, but one doesn't replace the other. Attempting to pack that much information just into function names results in those 60+-character atrocities Facebook source code is infamous for, and at that point, readability went out the window.

code of conduct - report abuse