DEV Community

Discussion on: Who Killed The Tab?

Collapse
 
kallmanation profile image
Nathan Kallman • Edited

A good analogy I think! In some ways it breaks down I think; color-coding is derived from the parsed meaning of the code where indention (aside from python and edge-cases) has no meaning to the interpretation of the code. Indention is only there for those reading it and has no effect on program execution... hmmm so actually, should we just stop indenting our code at all and have our IDE's decide how much indention to render (they already basically do this with helpful pre-indenting lines in many cases)?

(that would also solve the "whitespace-only" diff problems in git 🤔)

Thread Thread
 
bytebodger profile image
Adam Nathaniel Davis

Our IDEs absolutely do decide "how much indentation to render". But that's not really the question. The question is: How wide is each indentation??

People can laugh at my geriatric-ness if they like, but the simple fact is that there are many times when my eye tends to get "lost" when I try to follow multiple, indented layers of logic that are only represented by 2 spaces. For my personal taste, if I can simply add one more space to the width, all of that confusion goes away. And if we used tabs, we could all determine an indentation width that works for each of us.

But with spaces, that ability is taken away from me. I must view it with 2-space widths - because someone else decided that's the way that I "should" read the code - even if that way is harder for me to follow.