5 ms·
Exactly. I never understood the benefit of alignment. I actually find it harder to read - by making the starting point of the line less predictable it's harder
by spinningarrow 9y ago
Exactly. I never understood the benefit of alignment. I actually find it harder to read - by making the starting point of the line less predictable it's harder to skim through and if, say, you rename the function you've now got a much longer diff than necessary.
After talking to several people, I've realised this is very subjective though (what isn't!). I certainly prefer indenting only, without worrying about alignment.
- octalmage 9y agoI totally agree. You can fight with alignment all day and it's not worth it in my opinion. Just have it indented on a new line and call it a day.
- Sean1708 9y agoIt's not so bad if you use a formatter (still prefer indenting though), but if you align everything by hand it's just more annoying than it is useful (in my opinion).
- seanmcdirmid 9y ago> Exactly. I never understood the benefit of alignment. Alignment is what makes ASCII art possible. Without alignment, we might as well be using modern proportional fonts rather than old-fashioned type writer fixed-width fonts (ducks).
- plopz 9y agoI know some of my coworkers still use mono-spaced fonts and I just don't understand it. Proportional fonts are so much more legible and nicer to look at.
- khedoros1 9y agoI can't stand code in a proportional font. I like aligning code and having the alignment be maintained, regardless of the specific font in use. Things tend to also be more smooshed-together and hard to read individual characters when using proportional fonts, since every character's width varies, instead of matching the widest character. Aside from that, in the stylistic sense, it's like reading a newspaper article in cursive or an academic paper in comic sans. Those are the things that struck me when I've pasted code into an editor with proportional fonts, anyhow.
- seanmcdirmid 9y agoThere are other proportional fonts than cursive ones or Comic Sans MS. You should just use better fonts.
- khedoros1 9y agoOf course there are; I wasn't suggesting those as appropriate fonts. I was using them as extreme examples of stylistic mismatch. Proportional fonts have less mismatch when used for code, but they still tend to look "wrong" to me. A font like "Input" is attractive and offers proportional and monospaced versions. You're still left with the larger problem: fighting the font to line up data across multiple lines. Maybe you don't care about that, but in both my hobby and professional projects, I've found that alignment makes the code easier to read and easier to work with. I would need a very compelling reason to abandon that, and I haven't seen one offered. Going back to your original comment, you said: > Proportional fonts are so much more legible and nicer to look at. You also provided a convenient reply, which I think applies here: > You should just use better fonts. Hack, Input Mono, and a zoo of others are very attractive monospaced fonts. You aren't stuck with whichever ugly ones you're thinking of.
- seanmcdirmid 9y agoCharacter spacing, kerning, ligatures, and many other aspects of modern typography are all that you give up with type writer fonts. Yes, if you use a shit font like Times New Roman, it will look bad, but if you use a nice San Serif font, it doesn't look as you described (like cursive, comic sans, or another pseudo hand writing font). Yes, you give up the ability to do ascii art in your code. I find that this doesn't really matter to me or much of the code I use professionally (I can open up some random javascript code off of GitHub and they don't do non indent alignments). I guess if I was programming in C, this might be much more of a problem.
- deleted 9y ago[deleted]