Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Just go with language/IDE/company default and move on. The only rule I’d say is never mix within a file.
Personally I think tabs make more sense, but I use spaces because others do.
I get far more irked by Visual Studio not allowing me to change the line spacing. -
I've never joined in on the tabs vs spaces war, but being a PHP developer (where there isn't a restriction), I just use tabs. If I were Python, I'd have been forced to use spaces by now (although you can configure your IDE to convert tabs to spaces I believe). Maybe in an ideal world we would all use the tab key, but have it entered as 4 spaces for consistency? I have noticed some weird indentation issues on Github after pushing code. That was on a project with multiple developers though.
-
What if we don't care and use whatever is default ? Oh wait, which way is the bar ?
-
You're talking about soft tabs. Feels like tabs, isn't tabs (with the indentation change by backspacing)
-
So... No flame war. But @DLMousey and some others got drunk, so we got that going for us which is nice.
-
mojo20127836y@ckoulatsi if u use an IDE it creates the spaces for u when pressing the tab key. But what if ur using nano or vi?
Pressing tab once and actually getting that exact character is a huge advantage!
Also those who prefer two columns indentation can just configure it whereas with spaces its „hardcoded“ by the author ... -
mojo20127836y@sbiewald sure, but alot of editors can‘t. But let‘s not start the war. Spaces is just the „less good“ option from a logical point if view bc it limits you and others. But I do get that some people might just like it bc ... who knows
Related Rants
I never understood the ‚space vs tabs‘ war ...
Tabs can do everything that spaces can plus more:
* look the same as spaces, but its width is configurable (at least in a decent editor)
* the safe space (1 byte vs 3 or 4)
* you can decrease the intendation leven with one bsckspace keypress in every(!) editor.
So the winner can only be tabs? Why would I even limit myself with spaces?
I dont wanna start a flame war, just curious what you guys (especially the spaces lovers) think about it
rant
spaces vs tabs
tabs
spaces