Quick melanin check
Tabs are much easier to deal with.
>>109951986>sometimes 8-chars long>sometimes 4-chars long>sometimes 2-chars long
>>109951933(let ((x 1)) (f (g x)))only possible with spacestabs big gay
(let ((x 1)) (f (g x)))
>>109952187Yeah, so?
>>109952187it's always one char longyou can configure your editor to how wide you want it to be rendered
>>109952187But enough about spaces
>>109952318And then someone reviews your code in another editor with a different setting and it looks fucked.With spaces, it's consistent. 4 spaces is 4 spaces.
>>109951933Depends on the language.C-like: tabsLisp-like: spaces
>>109952333a single space is always 1-char long
Unicode needs a block just for tabs of different widths from 0-width tabs to 128-width tabs in increments of 0.1 and 1/64 fractions. This is what Unicode was created for.
>>109952340then you're using tabs wrong
>>109952388true, same as a tabhowever with spaces you need to use 2-8 of them for the same purpose as tabs, so effectively they are 2-8 characters long
>>109951933Spaces but editor set up to have tabs input or remove 2 spaces if valid.
>>109951933C chad checking inset tabstop=8set shiftwidth=8set softtabstop=8set expandtab
set tabstop=8set shiftwidth=8set softtabstop=8set expandtab
>>109952187Permanently convert tabs to spaces. Easy fix.
Tabs are for boomers and top 1% coooooders who are able to configure their editors.Spaces are for the rest.
>>109952240>inconsistent indentationAbsolutely disgusting.
spaces. specifically, 3.
Tabs
Tabs for structure, spaces for alignment.But in reality I think my IDE is set to emulate tabs with spaces or some shit, I don't even care anymore.
>>109952667nope, it's consistentthere's nothing right above g, so the indentation go to another level
>>109951933Used to like tabs, used them exclusively, usually 4 spaces wide. Then got into the habit of aligning small bits of code so that mistakes across lines would pop out, so I started using tabs for indentation and spaces to align stuff, and around the same time reduced to 3 spaces wide. But that broke shit in some editors, not to mention the tab width inconsistency. I also quickly became tired of reflowing comments to sort-of-maybe-not-really fit consistently regardless of indentation depth and tab width. Reducing tabs any further made no sense so I just switched to spaces, and now I just use 2 spaces everywhere.I still use tabs for markup languages like HTML/XML, it just makes sense there.>>109952499>8Fucking animal.
>>109951933Unlike primary school Word documents, tab is not a shortcut for adding white space faster.
>>109952412Bad terrible idea of someone who never really had to deal with text rendering
>>109951933Any program that cares about one vs the other is not production ready.
>>109951933One large unformatted text string, please
>>109952240all the wisemen say you use tabs for indentation, and spaces for alignmentlisp doesn't have indentation, only alignment so you cannot use tabs there
>>109951933Your editor should be able to solve this
>>109951933Every single space codebase I have seen has fucked up indentation. Its so easy to get misalignment when nothing stops you placing the cursor inside an indent. This is the one thing I have never understood about those who use spaces, how do you deal with indents not being atomic. It makes editing code absolutely suck.
>>109952340Looking fucked is still better than getting fucked. With spaces you have the same issue with space setting being different, but now you end up with multiple different indentation widths in the file. With tabs you only get the occasional alignment error for arguments, vs the entire indentation being fucked when you use spaces.
i mix them shamelessly