Child pages
  • Linie length should be more than 80 characters
Skip to end of metadata
Go to start of metadata

The current default length of code lines are set to 80 characters, which properly is a legacy from the time of 14'' monitors. The current 1600*1200 or more monitors are capable of displaying 250+ characters before needing a line wrap, which makes the 80 char limit seem rather constraining. The code is after all the primary information we work with in our development, so it feels unnatural to allocate only 20-25% of the screen for the actual code. The result is a lot of line wraps in the code, especially if you try to classify your classes, methods and variables with more informative names (eg. not l, m or c, but something like submitNewJobList). 

Unknown macro: {vote}


Feel free to add your arguments as a comment

  • No labels

1 Comment

  1. I prefer 80 characters per line. Reasons:

    • 80 characters is the default width of terminals, making e.g. "cat" and "grep" easily usable on code, without changing size of terminal
    • 80 characters per line is easily printable - printing 120 chars per line in fixed width requires a small font - and two sheets on one page is completely infeasible
    • Even with a wide screen, reading long lines is difficult (I need to physically move my eyes to see an entire line)
    • On wide screens I have two files open side-by-side. Two files with 120 characters is too wide for that, if I have anything else open, like a file hierarchy
    • 80 characters per line is pretty standardized, and widely used. Including several projects hosted on SBForge
    • I like putting my wide screen in portrait, meaning it's a tall screen, not a wide screen