DEV Community

Discussion on: Maximum line length in your code

Collapse
 
mortoray profile image
edA‑qa mort‑ora‑y

I stick to about 100 chars per line. If it looks like I have to go multiline I'll limit to around 90, but I'm flexible based on how the code looks. I find these limits generally fit within most screen and font sizes I've seen colleagues use. Beyond 100 also starts to become a readability issue with the code -- too much to digest at once.

For comments though I have noline limit and rely on wrapping to format the blocks. It's annoying to edit text that has line breaks in it that aren't meant for paragraph breaks.