Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I spend a lot of time writing code on my laptop, and while that could display two 100-column terminals side-by-side, I prefer to also be able to see other windows on my screen while having text at a size that doesn't strain my eyes.


Even on very large high resolution screens, it's nice being able to tile that many more files on the screen. I think 'narrow' source code is advantageous no matter your display.


I agree with you to a degree, but one of my pet peeves about certain linters and code formatting tools is when they take something that could easily be a very understandable single line, and break it up into three or more lines because that's what the normal rules look like. As a result, sometimes a 15-20 line function ends up being over 50 lines, and I end up not being able to see the entire thing without scrolling.


Also sometimes, long lines can more easily render the structure of the program. Like when a function is called with many/long arguments several times in a row, with varying arguments. If you have one line per call, you can easily see that it is the same function and what argument is changing at each call. If you rewrite each call as 5 lines, it is much more difficult to grasp what is going on.

And when you need to change, say, the second parameter, you will see that the same call is made n times, and not forget one in the process.


Yes, lining up arguments in a deeply indented column is criminally wasteful. Whitespace is a limited resource, to be applied where it is useful. Splattering it everywhere leaves nothing to use to unobtrusively direct attention where needed.


Yes, and human eyes are bad at tracking lines beyond a certain length.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: