Indentation: 2, 4 or x spaces?

View other answers to this thread

Learn Something New Everyday,
Connect With The Best Developers!

Sign Up Now!

& 500k+ others use Hashnode actively.

j's photo

just play 'pick a number' with your team and define an git hook that auto-formats your code.

tabs / spaces are mostly non relevant problems in modern software development. So it's about visual structure hence it's for humans hence it's aesthetics and this to me tends to be a bike-shedding discussion.

I let my team pick, I am old I don't care anymore about such things. Consistency is more important to me.

Jos Fabre's photo

full-stack father, developer, crafter

This is by no means a serious thing. After having developed for decades with just me, I'm now part of a team and I'm curious to what others prefer

j's photo

stuff ;)

Jos Fabre fair enough. to me it's more of a statement of time. I grew up with 1 tab, I got 'corrected' to 4 spaces so it looks everywhere the same. now they like 2 spaces.

But ofc it makes perfect sense to just ask. it wasn't meant as an attack or anything.

Want to read more?

Browse featured discussions

© 2020 · Hashnode