When Linus Torvalds rails against the 80-character limit
The creator of the Linux kernel thinks the constraint of 80-character lines has had its day and has more disadvantages than advantages.
In a recent post, Linus Torvalds takes issue with the 80 character limit on programming lines. Proponents of this usage, going back to 80-column terminals (and further to punch cards), argue that this is a long-standing convention and additionally allows multiple windows to be handled on a large screen. . The creator of Linux believes, for his part, that it rather hinders daily life by the line breaks it causes. “Excessive line breaks are bad,” he said in his post dated May 29, 2020.
He first cites, for example, the problems caused with the grep command which looks for a string in a file based on the lines. A pitfall found on many other very basic Linux utilities, recalls Linus Torvalds. In fact, many developers have long since abandoned the “80-column terminal” model and exceeded the limit of 25 rows visible at one time. If some continue to work on a small screen, it’s a personal choice that should not bother others, says the creator of Linux for whom “longer lines are fundamentally useful”. And remember that you can change the size of the characters and the parameters of the screen to display several windows. “People with restrictions on their hardware shouldn’t get in the way of those with better resources,” he said.
In some cases, brevity is still a good thing. There would be no point, for example, in further detailing the iteration variables, always called āiā. No need to be verbose when it is not justified, concedes Linus Torvalds. On the other hand, it is quite reasonable to use variable names of 10 to 15 characters rather than abbreviations if it makes the code more readable, he adds. One example among others of the usefulness of long lines. A few days earlier, on another subject, during a message on version 5.7 rc7 of Linux, the founder of the kernel had revealed that he had changed processors and switched to AMD after 15 years of loyalty to Intel.