2 ms·
The best world would be if every language had a decent formatter so everyone could view code as they wish and it was checked in at some standard width for a com
by ok_dad 5y ago
The best world would be if every language had a decent formatter so everyone could view code as they wish and it was checked in at some standard width for a company. Or, a world where git didn't see a formatting change as a code change if there were no change in logic; where it sees the AST rather than the textual content. Then, I could use whatever width I want and you can use your preference, and neither of us have to care about the others settings.
Go further, and you could even have a file to map one or more variables to a different name, so that is someone prefers "avg_val" and you prefer "average_value", then you could both see the different name, although that starts to get dangerous as you discuss the same code with different syntax but the same semantics.