3 ms·
I have always wanted some editor plugins to help with 2-space code indentation. I just can't understand how some developers think that 2-space indentation is re
by agentgt 11y ago
I have always wanted some editor plugins to help with 2-space code indentation. I just can't understand how some developers think that 2-space indentation is readable.
I don't have that many strong feelings on code style with one exception... code blocks should be indented at minimum of 4-spaces.
My feeling is that visually impaired people that prefer 4-spaces like myself have a physical perhaps even medical handicap/challenge of reading 2-spaces whereas the 2-space folks just prefer 2-spaces so they can shove as much things in one line as possible or have some sort of archaic 80 char per line argument.... or worse have shit loads of indentation (this is especially the case for Javscript and Scala... see Steve McConnell “Taming Dangerously Deep Nesting” section on "Code Complete").
And when it comes to diffing.. 2-space becomes so egregious that I have to take the code and replace with tabs at times.
- turbohz 11y agoSwitch to indenting with tabs. Problem gone.
- agentgt 11y agoOh I like tabs as well but many battles have been been fought and tabs is loosing ground in the overall war. Plus there are some fairly good arguments for languages that support variable indentation to not use tabs. So I concede that loss and concentrate energy on the "please god do not use 2-spaces" battle.