Earlier quoted context omitted.
Well I just want to fix the bug or write the feature and move on, but some want other things from their code.
That's the thing, without a standard formatter, a lot of IDEs use whatever their rules are. You can end up playing tennis because you just want to get that bug or feature done, you modify a couple lines of code in file X, Y, and Z, and now each of those files got reformatted by your IDE.
Is the 80 character line limit still relevant? (2008)
161–170 of 180 posts
Re: Is the 80 character line limit still relevant? (2008)
#162Re: Is the 80 character line limit still relevant? (2008)
#163Earlier quoted context omitted.
No it's not, it's perfect. You want to be able to do side-by-side diffs on your laptop using a normal sized (not tiny) font. You want to be able to paste snippets into design documents and emails and blogs without accidental wrapping or truncating or scrolling. 80 is nicely legible. It works really well.
Actually no I don’t want to be able to work like that on a laptop monitor. I’d rather optimize my full screen real estate. There in lies the conflict.
Going from 80 to 120 will net you, what -- an extra 2 or 4 lines in your viewport?
It's not worth the optimization when you lose so much for the reasons I described.
Re: Is the 80 character line limit still relevant? (2008)
#164Just because some people like to have a single pane of text cover their entire 16:9 display doesn’t mean I should have to. I find very vertical text much easier to follow. Wide lines are usually wide due to nesting and chaining, either of blocks or of inline expressions. Both are a thing which should not be. Concisely and clearly define one concept or abstraction. Then, use it in the next definition. This isn’t hard!…
It's hard if you don't know how to do it... and lots of people don't know how to do it.
It’s true that some people are illiterate and never learned to spell. That doesn’t mean it’s hard, it just means they never learned how.
Re: Is the 80 character line limit still relevant? (2008)
#165> An 80 character limit has no relevance any more with modern computer displays.
It's still nice to keep the code or anything readable on a vertical mobile screen.
Re: Is the 80 character line limit still relevant? (2008)
#166Earlier quoted context omitted.
I agree with you that writing readable and aesthetically pleasing code is more art than science (that can be expressed with deterministic rules), I still find some of the rules and rule-checkers beneficial (though I dislike strict formatters). As such, 80 is as good a limit as any, and makes you think carefully about avoiding deep nesting of blocks, which is usually a good idea anyway. It also allows putting many win…
I have to push back here a little bit. It really depends. I mainly use Scala, and I think the majority of Scala code would be far less readable if forced to 80 columns, than if it were a larger number (or simply unconstrained). My WFH monitor is an Apple Thunderbolt Display, which is woefully out-of-date now. Even on this display, and even though I use a much larger font than most people (16pt Hasklig), and even with…
Re: Is the 80 character line limit still relevant? (2008)
#167Note that when we talk about line length limits, we're actually conflating two separate concepts: 1) The maximum width of our viewports 2) How long we want our lines to be WRT the second concept, the general rule of typography is that a line should be 60-80 characters long. But, crucially, this is not counting indentation; a "line" here begins at the start of the text, not at the start of the margin. In the modern da…
Is there a single formatter capable enough for this?
Re: Is the 80 character line limit still relevant? (2008)
#168Earlier quoted context omitted.
What kind of monitors does your team use? I view diffs side-by-side all the time with much wider lines than 80 chars, but I have 27" monitors, which are not unusual these days.
All of my main external displays are 27". The diffs fit perfectly on them with the 80 character limit
Re: Is the 80 character line limit still relevant? (2008)
#169Re: Is the 80 character line limit still relevant? (2008)
#170Earlier quoted context omitted.
I agree this is terrible primarily because it muddles up any git-blame based workflow for debugging regressions. I think an autoformatter with the config checked into git is a nice way around this.
> I agree this is terrible primarily because it muddles up any git-blame based workflow for debugging regressions. ...it occurs to me, this feels like you're conforming to the tool instead of the other way around. Is there a reason git blame doesn't have an "ignore whitespace" option? Is it harder than it seems?