|
|
|
|
|
by DocTomoe
1864 days ago
|
|
I think this is where a lot of the trouble comes from: Tabs are misunderstood as "whitespace", as if code was some sort of DTP by a graphic designer. Code actually is a functional instruction to a machine - semantics matter, and this is where tabs shine: they are unambigious (did the developer decide to indent this this far, or not?) If tabs-as-whitespace trouble you, editors since the 1990s have allowed you to choose/configure other representations of tabs. |
|
They do matter for humans though. The reason we write code and structure it the way we do is for human convenience. One of those conveniences is thinking of the layout of code as a visual help to scan and read it. As such I am very much organizing my code like a graphic designer would organize information.
Edit: Indentations do matter in some languages and used to signify information. But not in a lot of them. The point still stands that most of the time we are using them for visual purposes not information to the compiler/interpreter.