Remix.run Logo
the_mitsuhiko a day ago

The war is mostly over because regardless of it you use tabs or spaces, the many modern languages use a code formatter and reformat to whatever is common. Languages that go with tabs are also now routinely mixing it with spaces for visual alignment and assume a certain tab width for total visual width enforcement.

On the other hand editors often now handle spaces as if they are tabs, even for cursor movement. So well. Both won?

I remember a time when people religiously claimed that both tabs need to be the way to indent but also that they have to be 8 spaces visually. I guess at least that war was lost since now even CSS allows you to change the number of visual spaces a hard tab has.

tinco a day ago | parent | next [-]

No one who uses tabs would ever assume a certain tab width for visual alignment. What do you base that slanderous statement on?

I've also never heard anyone argue that someone else should configure some different tab width, is there a specific language ecosystem you were in that had these insane takes?

ben-schaaf 20 hours ago | parent [-]

To quote the linux kernel style guide:

> Tabs are 8 characters, and thus indentations are also 8 characters.

Yes, tabs are used for alignment as well.

To quote the OpenBSD style guide:

> Indentation is an 8 character tab.

The GTK source code uses tabs when the number of spaces for indentation >=8. This goes against their coding-style document, but if you don't have tabs set to 8 you'll find the indentation broken.

git is the same: although it prescribes tabs if you don't set the width to 8 you'll find broken alignment everywhere.

tinco 15 hours ago | parent | next [-]

Oh that's terrible. I guess I'm the one that's been living in a bubble. If that's the kind of people fighting the war on our side, no wonder we lost.

RGBCube 14 hours ago | parent | prev [-]

This is horrible and goes against the purpose of tabs. You should NEVER use tabs for alignment, only for indentation.

frizlab a day ago | parent | prev [-]

And yet, navigating the code, you still have to got left-left-left-left to pass the indentation and it’s stupid. Tabs are here, everybody should use them, they are the logical better option, everybody knows it.

arccy a day ago | parent [-]

learn some vim based movement, jump to the next non space character.

frizlab a day ago | parent [-]

alt-arrow

But it’s not what I mean. When navigating using the arrows it just breaks the flow because suddenly you “don’t move anymore.” Hard to explain, but it is real.