Hacker News new | ask | show | jobs
by gsoto 2025 days ago
As long as source code resides in plaintext files, writing in columns (i.e. vertically aligning blocks of text) seems like an excessive endeavor with little gain.

We are not typesetting; formatting resources should be kept to a minimum to make the code easy to handle in plaintext. Fortunately, code is restricted enough that we can do pretty well without those.

You don't write spaces to align text in Word: it's a nightmare to maintain and the software provides better tools for that purpose. Why do we still write code as if we were using a typewriter?

You may think you are improving readability by aligning columns of text, but then, the impossibility of standardizing such baroque formatting rules goes against that. Furthermore, you are preventing people from using a variable-width font, which is actually better for readability.

2 comments

I believe you'd like elastic tabstops: http://nickgravgaard.com/elastic-tabstops/
I love them! It's a shame they didn't really catch on.
So you’re against any indentation? I don’t think you’ll find many programmers at all who agree with that statement.
Indentation is OK, sure. I was talking about aligning stuff on the middle of a line.

I find tabs better for indentation but in practice end up using spaces.