Email or username:

Password:

Forgot your password?
82 comments
Stevens R Miller

@catsalad

But my good horse for an editor that recognizes all spaces from the cursor back to the first column, and deletes the same number it puts in for a tab upon each press of the backspace key.

Jason Petersen (he)

@catsalad @clayton I want to remake this with an if statement and the next line indented eight stops, and the second image is an if statement with the next line indented two.

Clayton Dewey

@jason @catsalad ๐Ÿคฃ๐Ÿคฃ๐Ÿคฃ๐Ÿคฃ

mokrates

@jason @catsalad @clayton The correct indentation is what emacs does when tab

cat K.

@catsalad @prahou how am I going to explain to my wife why I'm laughing so hard

Meow :verified:

@catsalad Is there even a standard that specifies how many spaces a tab should be?

Rupert

@housepanther @catsalad The whole point is that the reader gets to choose.
Using spaces tells the reader that you hate them and hope they get leprosy.

Rupert

@housepanther @catsalad Yes, I was on the losing side of that war. Still not convinced it was the wrong one.

danrot

@rupert @housepanther @catsalad Because it wasn't. I was on team "don't care" for quite a long time, but since I stumbled upon this reddit post it is clear to me that tabs are a lot better: reddit.com/r/javascript/commen

weebull

@danrot @rupert @housepanther @catsalad If people could actually, consistently limit tabs to block indentation, and never use them for alignment, then I might be convinced, but I've never seen this happen across a team.

The result is, especially in code bases written with a narrow tab stop active, that alignment (i. e. Indentation done that needs to be the same width as some text) will invariably be done with a mixture of tabs and spaces. Change the tab stop and everything breaks in a way that helps nobody, especially visually impaired people.

This is probably a tooling problem as much as anything, but tabs are too easy to get wrong.

@danrot @rupert @housepanther @catsalad If people could actually, consistently limit tabs to block indentation, and never use them for alignment, then I might be convinced, but I've never seen this happen across a team.

The result is, especially in code bases written with a narrow tab stop active, that alignment (i. e. Indentation done that needs to be the same width as some text) will invariably be done with a mixture of tabs and spaces. Change the tab stop and everything breaks in a way that helps...

Meow :verified:

@weebull @danrot @rupert @catsalad That's why they need to be standardized across the board at a nice even number like 4 spaces. Until that happens, spaces are definitely the way to go over tabs.

danrot

@weebull @rupert @housepanther @catsalad Aligning stuff is a horrible idea IMO anyway, since it forces you to change multiple lines as soon as one longer name term is introduced. Get rid of that and you'll have a better code base no matter if you are using tabs or spaces.

weebull

@danrot @rupert @housepanther @catsalad I agree for separate statements, but you don't align to parenthesis in multiline statements?

danrot

@weebull yeah, but I don't see how tabs are a problem here ๐Ÿค” Or I don't understand what you mean by that, care to share an example? All I know is that I never ran into issues with tab code bases.

Kaiyalai

@housepanther @catsalad in my experience itโ€™s usually either three or five spaces and I can never predict which. But usually one of those.

Jeremy List

@catsalad I was of the tabs persuasion but then I started using debuggers that would highlight the wrong bit of code unless I used spaces.

Jeremy List

@jgamble @catsalad it's a surprisingly common way for debuggers to be broken.

Mike Myers

@jeremy_list I just use tabs but have the editor replace them as spaces. Works well for me. I still get to use the tab key without pressing space 2, 4, 6 times but get the better compatibility of spaces.

penryu

@catsalad @squinky an overused language reimagined as an overrated rapper

aiuto

@catsalad when I write golang code I set my tab width to two spaces.

Brennan Stehling

@catsalad Revealing whitespace can be like turning on a black light in a hotel room. ๐Ÿ˜ฌ๐Ÿ˜ณ

rood

@catsalad \t ยฏโ \โ _โ (โ ใƒ„โ )โ _โ /โ ยฏ

rood

@catsalad
(โ -โ _โ -โ  โ )โ ๏พ‰โ โŒ’โ โ”ซโ  โ โ”ปโ  โ โ”ฃโ  โ โ”ณ | ____
<โ (โ ๏ฟฃโ ๏ธถโ ๏ฟฃโ )โ โ†— | __
โ”โ (โ  โ ห˜โ _โ ห˜โ )โ โ”Œ | \t

Erwin Wessels

@catsalad feels like youโ€™re sub-tooting Pythonโ€ฆ

Felipe Kinoshita

@catsalad even though I prefer spaces, tabs are more accessible to everyone

KeithC

@catsalad shouldn't really matter unless you are using Python which made the despicable and arguably insane decision to make the amount of whitespace syntactically and semantically meaningful. I stopped learning Python when I found out about that and didn't want to know what other stupidities were hidden within.

Ellie

@catsalad #alt4u

A 4 panel meme comic titled "Tabs vs Spaces", in which a person is depicted rejecting the contents of an adjacent blank panel on the first row, followed by the same person expressing approval for another blank panel on the second row.

This joke relies on visual ambiguity between tabs and spaces, neither of which are discernable from the blank background in the panels. It remains uncertain whether the person approves of tabs vs spaces.

Lydia Conwell

@catsalad That really should be Tabs vs Paragraph Style Indent

่ฉž็†ๅฑ‹ :apartyblobcat:
@catsalad BUT did the person who make this meme actually make a text placeholder containing a space and a tab, or did they ignore it knowing that it'd make no visual difference?
synlogic

@catsalad exactly! Blessed Spaces and Holy Vim are clearly superior to tabs and emacs and the other forms of barbaric heresy practiced by The Others! *holds up cross*

Woodswalked

@catsalad
Aah! Some disagreements are eternal.
Let us all at least join in with discrediting the alternating mixed whitespace coding.

Woodswalked

@catsalad
AHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!
NOOOOOOOOOOOOOOOOOOOOOOOOOOOO!
ARRRRRRRRGGGGGGGHHHHHHHHHHHHHHHH!
SSSSSTTTTOOOOOOOOOOOOOOOOOOOPPPP!
*gasps*
AHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!
NOOOOOOOOOOOOOOOOOOOOOOOOOOOO!
ARRRRRRRRGGGGGGGHHHHHHHHHHHHHHHH!
SSSSSTTTTOOOOOOOOOOOOOOOOOOOPPPP!

zem

@catsalad tabs or spaces do not matter, U+2007 always beats you! ๐Ÿ˜‹

James Boag

@catsalad Just think, If you used just the one space, you could rotate your monitor to portrait and read more
lines of code at once.

Full Metal Archaeopteryx

@catsalad
Again I am reminded of the glory of WordPerfect 7...

Mind you, I am a writer and so tabs are essential for good print.

If you can set the tabs and they will stay put.

Unfortunately, Word for Windows and almost all other modern word processors are object oriented instead of text oriented (like the aforementioned WordPerfect), and anytime you change something or place an object, the program fucks with the tab settings.

7leaguebootdisk

@catsalad not enough of you kids have dealt with make files, where the difference matters, for some insane reason.

Eric Phelps

@catsalad Oh, I was a hardcore tab guy. Then I had a nicely-formatted router configuration file (with tab indents, naturally) and I pushed it into a router over serial.

You know what a *nix OS does when it sees a tab on the command line? It does *not* ignore it as white space. It thinks you want "tab completion" and will happily replace that tab with... Something. Something that will completely mess up your router configuration and take you hours to troubleshoot.

So now I'm a spaces guy.

pesco

@ericphelps
that's what happens when you pipe random text into an interactive (!) shell session??

maybe it was the router's crap interface that made you do it, so don't take it personally...

but if one time you threw soup into a running blender with no lid and it made a mess, do you complain about the blender and shun soup?

PS: edited to make this sound less malignant, sorry.

M0KHR

@catsalad This is why I sometimes hate Python with a passion.

Go Up