4 ms·
I agree about horizontal space adding to readability and I use that method fairly often. That said, if you use classes, descriptive names, and appropriate comm
by otteromkram 2y ago
I agree about horizontal space adding to readability and I use that method fairly often.
That said, if you use classes, descriptive names, and appropriate comments, it won't matter how you group because your code will be self explanatory.
Finally, with today's wide-screen monitors on desktop, line length is less of a worry. Problem only arises when reading code on mobile devices.
The last workplace I was at had a soft wrap around 80 characters, but we upped that to 100 when functions and methods became almost vertical.
- arp242 2y agoYou want to wrap in logical locations at times. That's my point. To repeat: cramming as much as possible on as few lines as possible is just not going to work well. Wrapping at column 80 vs 100 or whatever has nothing to do with that. That XCreateWindow() would be: window = XCreateWindow(display, XRootWindow(display, screen), center_x, center_y, size, size, 4, vinfo.depth, CopyFromParent, vinfo.visual, CWColormap|CWBorderPixel|CWBackPixel| CWOverrideRedirect, &window_attr); And that's just not better. It's much much worse. Only a human can judge where it makes sense to break things (or not break things). Completely forbidding "paragraphs" would be atrocious. Almost everyone will hate it. Just like everyone hates walls of text in comments. And in the end a huge amount of complexity is added throughout the entire stack (from editors to grep to sed to code hosting) for very marginal gain with significant trade-offs.
- layer8 2y agoLine length is a worry because of readability. This is unrelated to the width of monitors. Having to read and visually parse a 200-character line is no fun. In addition, since most lines are relatively short, you also don’t want to have your source code window extra wide just in case, if instead you can use that space for other useful information and controls. Also, why does your comment have a paragraph break after each sentence except after the third? Because of semantics and the related readability. The same is true for source code. Readable layout does not depend on syntactical structure alone.
- antifa 2y ago> today's wide-screen monitors on desktop, line length is less of a worry did you buy a large monitor just to full-screen a single text file?