When coding, do you use spaces or tabs?
I don't code, but I saw Silicon Valley (HBO series, super good) and the main character always said that those who use spaces instead of tabs are psychopaths…
So my question is, which do you prefer and why? 🤔
LET THE HOLY WARS BEGIN!
Jokes aside, tabs, no doubt. They're easier to work with. Editors have great support for them. I think they're aesthetically pleasing and easy to do. Just one key and you're done. Also easier to delete.
I really never understood the spaces crowd, aside from the extra granularity they provide.
But yes, the spaces crowd are psychopaths.
Tabs on Monday
Spaces are for Tuesday
Tabs and Spaces share a Wednesday
Coffee is for everyday
I'm a tabs guy by nature, but I never really had a dog in this fight until someone made the argument that spaces could make it really hard to read for coders with eyesight issues, so you can now put me firmly in the tabs column. :)
Is this the episode you're referring to? https://www.youtube.com/watch?v=SsoOG6ZeyUI
Grab a 🍿 and go through the YT comments 😂
And also this has some insightful answers: https://dev.to/_shadz/tabs-vs-space-49l5
In practice, in most modern environments, tabs are implemented as spaces. So in reality there is no difference.
BTW most of you use spaces and don't realize it :P
VS Code default is to insert 4 spaces per tab. I change it to 2.
Please sign in to leave a comment.