Reply to post:

Software dev bombshell: Programmers who use spaces earn MORE than those who use tabs

Charles 9

Inline comments? I generally don't align between lines. I usually just tab out from the end of the line once or twice to get some space and go from there. Since they're most pertinent to the specific line, I just go from there. If they're a cluster of single lines, I may attempt to tab-align, but these comments tend to be brief as well, so if they misalign due to changed tab width, it's just a mild nuisance at that point. More important comments I use whole lines and align with the code, meaning it moves along with the tabs and stays lined up.

PS. I've done assembler, and I DID tab-align, there. Thankfully, assemblers tend to have a restricted grammar that makes aligning labels, opcodes, arguments, and so on easier. And as long as you stick to a general rule of thumb of setting a generous tab width (6 at a minimum, 8's a good rule of thumb, more or less depending on your architecture), it tends to read just fine.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon