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

This is why I don't use tabs, and instead use 2 spaces for indentation like a sane and reasonable person.


I haven't seen any poll results (yet!), but I bet we're in a pretty small minority. Two spaces is jist what i find most aesthetically pleasing. Four seems to be the standard among my peers, and the apparent fact that the standard is historically eight boggles my mind.


Well, it was (kind of) a joke about "sane and reasonable" because everyone seems to have their favorite reasons for preferring one way or another.

I agree about it being aesthetically pleasing. For me it's the easiest spacing to read and scan code horizontally and diagonally.

And apparently:

> using spaces instead of tabs is associated with as high a salary difference as an extra 2.4 years of experience.

https://stackoverflow.blog/2017/06/15/developers-use-spaces-...


I cowardly use tabs viewed as 2 spaces so if needed in the future some quick lazy code like sed can convert it to 4 spaces or something if someone demands.




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

Search: