:comfyumm: indenting code with tabs
:comfythumbsup: indenting code with spaces
:comfyhyperthink: indenting code with a mix of en and em spaces, sometimes adding zero-width spaces just for lulz

@newt I would rather press once than four times to indent.

@newt Takes four spaces to indent as much as tab once.
Granted you can tweak the width of space and tab in text editors sometimes, but if your spaces are as thick as your indents ya got something else going on.

@Paradox
>Granted you can tweak the width of space and tab in text editors sometimes, but if your spaces are as thick as your indents ya got something else going on.

what the shit are you talking about?

@newt I'm talking about you calling indenting with tabs cringe. And I'm saying most people, to get the indent they want, will either press space four time or tab once. Personally, I prefer the latter, because it's fewer button presses.
We on the same page now?

@Paradox ok.. nobody ever presses space four times. When you hit Tab, chances are, your editor inserts four spaces instead of a tab character.

Second, nobody ever changes the width of space and tab characters themselves. Usually, people change how many spaces a tab character is rendered with. That's it.

@newt Well then how many time do you press space? Or do you just have the tiniest indents known to man?

@Paradox i don't press the spacebar to indent anything. My editor inserts spaces automatically.
@Paradox it's the norm.

The whole argument isn't about what key you press, but what characters end up in the file.

Did you really think that some people indent code by repeatedly pressing the spacebar on every line? :comfyeyes:

@newt What does the character matter?
I dunno man, people have done dumber shit.

@Paradox it kinda matters in some specific circumstances.

Mostly, tabs are less flexible and can cause issues if different people have different editor configs. For example, for me a tab character can be rendered as 4 spaces, but for you it can it 8.

Few people actually use tabs these days, but they are very aggressive about it.

@newt @Paradox it's still wild to me that the same software community, that learned a long time ago how hard-coding things that should be customisable is a bad idea, still has a lot of people insisting to hard-code the visual width of indentation by using spaces instead of tabs or another character that semantically represents a single level of indent.

Because fuck different people with different monitors, "thou shalt use 3 spaces for indentation because I say so".

@newt @Paradox and the worst part is that the two most sensible arguments for using spaces over tabs have silly simple solutions:

1. "But tabs can be rendered with different widths 😭" yeah, that's an upside not a downside. If you don't like how wide or thin tab-indentation looks in your editor, just tell it to render it with different width, problem solved. You can't do that for code where some dumbfuck used 2 spaces for indent and you'd like to see the indent levels more clearly. This also applies to the people using text-based environments with the Unix default rendering of 8-width tabs - yes, vim, emacs or whatever 80s software you prefer is smart enough to be able to do `s/\t/    /`* before writing to the tty or has a plugin available for this exact purpose.

2. "B-but tabs can be rendered differently by different browsers so a tab-indented code pasted into a random text element can display weirdly for people viewing it on IE6" - rendering code to a universal text representation is as much of a thing as rendering it on a screen, and again in this case amounts to running `s/\t/    /`* on it. Code hosting websites already do this. Oh, and did you know that the official standard way to render multiple spaces outside of `<pre>` elements is to concat them into a single one, making them even worse in that regard? And that CSS has a `tab-width` property? Wild stuff.

*yes, these are non-breaking spaces, or at least that's what I typed before clicking "post"

@Amikke @Paradox yeah yeah yeah. But don't be mad. Nobody uses tabs except a few die hards. Spaces won!

@newt @Paradox cheering that a worse option was chosen by a few organisations that dominate the ecosystem because it's the one you're used to is certainly a weird flex

@Amikke @Paradox i'm cheering because it's the option i prefer and therefore it's the best one

@newt @Paradox that would be a perfectly fine approach if it really was an arbitrary choice and not a long-running problem that is continuously inconveniencing many people and spawning even more fights. (4 spaces? 2 spaces? 3 spaces? 5 spaces? 1 space?)

@Amikke @Paradox yeah yeah yeah. See? I've never had this problem in the recent years, except when someone strongly preferring tabs comes up. Nobody else really cares.

@newt @Paradox in case of tabs literally nobody would care because it wouldn't be a problem for anyone in the first place.

And I suspect that the number of people that do care is vastly underestimated, since when encountering space-indented projects they usually are only mildly inconvenienced and so just let out a sigh and go on with their lives. That's what I do, unless encountering an already existing thread on that topic and having some time to spare to join in.

@Amikke @Paradox in case of tabs, people would care because tabs suck. Seriously, stop this already. Just accept your loss and move on with your life.
Follow

@newt it's not my loss, it's the whole community's, and thankfully it's nowhere near as done and set in stone as you suggest. Hell, I doubt spaces could ever fully win due to aforementioned issues, the best they can do is the USA measurement system approach, settle on an inferior choice and remain in this awkward and contested state for who knows how long. I like how you can't find a single yet unburnt argument against tabs and fall back on "they suck" though lol

@Amikke I'm not even trying to find arguments. Why would I? I use spaces, my friends use spaces, literally everyone except for a few holdouts uses spaces. Even linux kernel devs use spaces and they are among the most conservative!

@newt you shouldn't have to try to be able to rationalise your choice, and living in a bubble of "the people I know use this, why bother thinking about it" is how you end up with silly status quos like this one in the first place.

@Amikke i could say the same about tabs, because there is literally nothing superious in using tabs. Only pain in the ass. Please, continue.
Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.