this post was submitted on 27 Jun 2023
181 points (100.0% liked)

Chat

7498 readers
3 users here now

Relaxed section for discussion and debate that doesn't fit anywhere else. Whether it's advice, how your week is going, a link that's at the back of your mind, or something like that, it can likely go here.


Subcommunities on Beehaw:


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS
 

For me I say that a truck with a cab longer than its bed is not a truck, but an SUV with an overgrown bumper.

you are viewing a single comment's thread
view the rest of the comments
[–] sorchist@beehaw.org 1 points 1 year ago (2 children)

Most programmers' editors automatically indent the line appropriately without having to hit either the space key or the tab key, and if you do hit the tab key it usually just inserts enough tabs or spaces (whichever you configure it for) to take it in one level of indentation. Programmers depend on hyper smart specialized editors.

[–] argv_minus_one@beehaw.org 1 points 1 year ago

Backspace, on the other hand, deletes a single character and not a single level of indentation. Arrow keys, similarly, move by characters and not by levels of indentation. So, there's still a reason to use tabs.

[–] metaltoilet@beehaw.org 0 points 1 year ago (1 children)
[–] sorchist@beehaw.org 1 points 1 year ago

I work all day in a large codebase which is entirely space-indented, and I must say the amount of time I've spent backspacing through indented spaces in order to get to the right indentation level, or moving individually through indented space characters with the arrow keys, adds up to less than a minute a month. So while that may be "a reason" to prefer tabs, it isn't much of them, at least, not if you use a good editor. It just doesn't matter.

If you want to understand the issues more thoroughly, internet hero Jamie Zawinski wrote a treatise on it 23 years ago, and not much has changed since then.

https://www.jwz.org/doc/tabs-vs-spaces.html

My observation is that space-using people tend to be like "OK if tabs make you happy, I guess you can do that, I'm going to keep using spaces, which I prefer because of (reason X Y and Z)." And tabs-using people tend to be like I WILL NOW LECTURE YOU ON WHY TABS ARE OBJECTIVELY SUPERIOR AND I WILL NEVER STOP. I CAN'T BE BARGAINED WITH, I CAN'T BE REASONED WITH, I DON'T FEEL PITY OR REMORSE OR FEAR. AND I ABSOLUTELY WILL NOT STOP, EVER, UNTIL YOU ARE DEAD.