I really hate trailing whitespace, but the exact reason is a bit vague.
I guess the origin of that feeling is not in programming, but in the desktop publishing field. Have you ever got a document typed by someone else that needed to be typeset into a publication? In all modern publications, especially when using columns, it is custom to have sentences follow each other sequentially within one paragraph, not starting a new line for each sentience. Well, when there is trailing whitespace, it takes a lot more effort to get it right (lots of search and replace actions that eliminate double spaces, etc...).
Other reasons (in programming), not good reasons, I know, but they bother my subconscious psyche in such aggravating intense manner that they compel me to eliminate it:
- It takes more storage space than necessary
- The parser will have to skip an extra character for no good reason when compiling
- Some editors might add an extra blank line when WordWrap is on and the
trailing space doesn't fit
Yes, yes I know! I know, these are junk reasons. I'm not a perfectionist, but... well maybe I am?
The last reason I can think of is inconsistent cursor movement. It feels like the cursor is hanging in thin air at the end of a line, every step to the right may cause it to aether drop or to hover farther to an unknown extent, it just feels unsteady (like those invisible or disappearing blocks where Super Mario used to jump on).
Probably I can be diagnosed with trailspacefobia?