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
-
4 space indentation for the win! 🤓
Those of us who use spaces know that our indentation isn't going to get messed up.
This is important.
We also clearly care enough to want fine-grained control over our visual horizontal and vertical alignment.
This is also important.
And clearly important enough to be rewarded! 😊 -
@edwrodrig Burn the heretic!
(Only kidding).
I think consistency is more important than the number of spaces.
In my Pascal days at University I used 3 spaces.
Starting work I used 2 spaces to fit in with colleagues.
Then switched to 4 spaces to fit in with another team.
I've found I prefer 4 spaces, but don't really mind so long as the indentation is consistent. -
@Wildgoose I don't mind. I like the 80 cols rule, so every character is precious, specially when you have long meaningful function names. But that is my choice. Not a big deal.
-
@edwrodrig I follow the same rule, (actually 79 chars).
One advantage of using 4 spaces is that it very quickly shows that your code is becoming too deeply indented.
Keeping indentation levels down is a very good way of keeping unnecessary complexity from your code.
Basically, it's fewer context switches for the CPU in your head. -
Bikonja23867yFfs, from now on I'll use space-tab-space-pooEmoji-space for my indentation since obviously people don't care about proper indentation...
-
neolium12707yWhy should i press a key multiple times when i just can hit it one time? 😂
The life is limited like the amount of chars for the commentinput 😂😂😂 -
@Christian1998 I press tab and let my editor convert that to whatever the convention for the project is.
Haha... I knew it. 🤑😛
https://stackoverflow.blog/2017/06/...
undefined