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

> You can use tabs to indent and spaces to align after that, in most cases.

In practice this is difficult; since the characters are invisible by default, people will inevitably mix up the two. Looks like the industry standard is to give up and use spaces everywhere, unless strict and mandatory tooling exists.



And that was (one of the reasons) why spaces won: alignment always worked.

But the new problem is linters and formatters don't understand alignment, so they always want those extra spaces removed, making a mess.


> linters and formatters don't understand alignment, so they always want those extra spaces removed, making a mess.

I’m not sure what are you referring to, could you give an example?


That's on you though, in the editors I use they are visible and not just in my default IDE.


Stop aligning stuff. I don’t even use a monospaced font.


Yeah, let's just give up on readability


Alignment does not improve readability. Indentation is crucial, alignment is asinine.


> Alignment does not improve readability. Indentation is crucial, alignment is asinine.

What? Well aligning e.g. a long SQL statement is asinine and does not improve readability??




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

Search: