wait what
wait what
wait what
I know it’s a joke but I prefer the tab option. It’s easy to convert tabs to any particular spacing or code point width. It can also vary, if wanted, based on terminal or editor type.
People with worse eyesight can have a wider indentation while those who choose can opt for something more compact
Honestly I always preferred tabs for indentation and spaces for aligning. It doesn't break anyone's experience. And if somebody wants two spaces for a two-space-tab-width for indentation and other people prefer four. That will work just fine.
I hate seeing 2 space indents. Unreadable AF ( to me ). At least this way I can easily work in the same codebase without somebody being annoyed ( except for the crying about the tabs )
Why not tabs for both indentation and alignment? (Actually, I see indentation as just a specific use of alignment.) Word processors have been doing it for decades (and typewriters for over a century!). Surely we can convince our code processors to use user-definable, fixed position tabs instead of relative position "tab = x spaces".
Keeping the [TAB] character in the file then allows everyone the layout they like.
Or has working solo for 40 years fried my brain?
Yeah, I understood the arguments against using tabs for alignment, but never really got the argument against using them for indentation.
I can't imagine it would be difficult for an IDE to scale the width of spaces found at the start of a line, to emulate this same customization while still preserving my sanity as a fervent space-indenter. I've never seen an IDE that does this, but it'd be an interesting compromise.
I agree, tabs are better but I have been using spaces for so long I can't even imagine switching to tabs. also I'd have to reformat all my abandoned projects.
Tabs are objectively the better choice as it allows each dev individually to decide tab width in their editors. Spaces in contrast don't allow this same flexibility as they are used for much more than simply indentation, for example you likely put a space after each argument or operator IE func(arg1, arg2)
or 1 + 2
.
Also, a lot of editors won't unindent on backspace of spaces indentation, so I end up messing up the indentation with a 3/4 indent
Code can be viewed in more than just an editor. It might be in a terminal, rendered in a browser, etc. Sometimes you might even have to view it in an environment you don't control. I am very disinterested in configuring each and every tool to have sensible tabstops, if such a tool can even be configured.
Then don't? The whole reason nearly all the spaces guys do 4 spaces is cause that's the nearly universal tab width. You won't like this but the same exact argument can be made for spaces yet I'd bet you haven't even once configured the width of those.
I don't actually change tab width, it's the default 4 spaces equivalent for me but just because I don't take advantage of the ability doesn't mean I should prevent others from doing so.
The sole purpose of the tab key is for instructing the editor to insert four spaces.
And indent according to my major mode.
Team Tab Supremacy Unite!
Hell yeah tabs
Let's just avoid indentation at all (jk).
Always remember:
“He's me.” - Obi Wan Kenobi
As a fan of tabs I see this as an absolute win
Is this real or am I eating the onion
You're eating the onion. I could see some government agency deciding that they as an agency would standardize on tabs, though even that would be a stretch. But not the White House.
🧅
Tabs exist specifically for spacing out stops. They're viewer-configurable, avoiding holy wars about 4 or 8 or that one idiot suggesting 3.
I do not give a shit if your seventeen-argument function has the overflow variables line up exactly with the paren. Just put them one step further in.
I just remembered the dumbest argument I've ever suffered about this - someone insisting the "length" of one tab changed, depending on what's before it. As in, is it eight spaces, or seven? Or six! It only goes up to eight spaces! No. It goes one stop. The same way a newline goes one line, and cannot by measured by how many times you'd slap the spacebar to get text to wrap around to the next line.
Your ide should align things how you configure them to be aligned. Nothing says all my tabs need to be the same length.
The correct answer is, was and always has been elastic tabstops
Any ides have support for this? I feel like I've been waiting forever.
Looks like there's an emacs package for elastic tab stops.
Wow this site is hard to read, at least on mobile (haven't tried on my PC). The line-height is too small.
I've been hoping someone would try that!
Feels relevant
Just make everything Shittier
Maybe it is time for another civil war.
It's pronounced "GIF".
Hell no! It'll be "GIF" until the day I die!
Spaces are supiror because its easier to text boxes.
I mean where even is the tab on my phone?
Right here
Edit: til tabs make code blocks in lemmy
Another person who codes on their phone.
I bow to your greatness.
I actually does code a bit in phone(and only codes in phone) and still preffer tabs. Hate it when some editors auto spaceify it. Also you can have tabs on keyboard by installing abother keyboard app
Sololearn is great for coding on the phone
Man how are we gonna write all of our Whitespace programs now?
MUMPS has entered the chat.
But like... Correct me if I'm wrong but in my experience tab does not always equal 4 spaces.
E: thanks all. I didn't fully understand.
That's one of the benefits of using tabs. Some people might like 4 spaces for indentation, whereas others like 2 spaces. If you use tabs, you can configure your editor to use whatever tab size you want, and they're just stored as tab characters in the file.
Tabs for indentation, spaces for alignment (eg for ASCII art).
That's why it's also a big accessibility feature. With big font sizes, four spaces are distracting but you can configure tabs to show up as one character, which is way more reasonable with font sizes larger than usual
I had a colleague that is legally blind in my second real job. The dude is brilliant (and hilarious) but these things would significantly enable or screw up his productivity. I have always felt fortunate to have had direct butt in seat exposure to the importance of accessibility at such a young age.
You’re misunderstanding. In this case it means “one tab character” instead of “four space characters”.
Four? Uh oh...
I'll just leave this here
'Bout time.
a Go fan.
Yay at least this comment section has majority tab lovers!
The enlightened among us use spaces for indentation and tabs for alignment.
No.
Between this and their declaration to stop using C tells me they're ramping up for cyberwar.