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

>Because tabs are a pain in the arse when you open them in a different editor and neat code suddenly becomes unreadable as the indentation gets messed up.

I never had that experience, and I've used Vim, Eclipse, ST3, TextMate and BBEdit. How does that ever happen?

A tab is a tab, no matter the editor. One might be set to show it as 8 chars wide or 4 chars wide etc (since it's a logical unit), but no indentation gets "messed up".

If by identation you mean: "variables arranged to start at the same point because the programmer has OCD", maybe. But no declarations or indentation that matters, like braces etc ever changes.

>Most editors have a "tab button prints spaces" option

Yes. The back-to-the-seventies elaborate kludge I've already mentioned. It's 2014.



It happens when you open up code written by others. That's when I usually see it.

In that case you would have to set your editor to display 8 spaces per tab, or 4 or whatever the code editor where the code was written was using. I don't see that being any less of a kludge than changing it to do spaces when a tab is pressed.

I have given you a reason why I prefer spaces over tabs. Your reasoning seems to be "because I can". Then start harping back to the 70's despite that part of your comment being irrelevant.

Is there an actual reason you prefer tabs over spaces, given that you can't visually tell the difference most of the time?


Also as I mainly use Python, it is the preferred way to indent.

http://legacy.python.org/dev/peps/pep-0008/#tabs-or-spaces




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

Search: