What is the Best Line Length for Code Today?

0
10
Asked By CodingExplorer92 On

I'm curious if the 79-character line length standard is still relevant in modern programming environments. After ten years in Python, I've found I rarely encounter situations where this limit is beneficial. Instead, I often end up breaking expressions awkwardly due to this constraint. Are there any statistics, surveys, or just personal insights on what line lengths feel comfortable for most programmers today? Should we be aiming for limits like 100, 120, or even higher? This topic is especially important for those of us contributing to free and open-source software, so I'd love to hear everyone's thoughts.

1 Answer

Answered By DevTalks101 On

I think line length should primarily be about readability, especially for viewing diffs. Some folks feel that around 80 characters is still optimal, as it allows for side-by-side views on laptops without scrolling. But personally, I find anything over 100 starts to become a challenge to track.

CodeNinja42 -

Absolutely! On a 1080p screen, keeping it around 80-100 characters works pretty well, especially when reviewing PRs on platforms like GitHub.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.