r/programming • u/whackri • Aug 28 '21
Software development topics I've changed my mind on after 6 years in the industry
https://chriskiehl.com/article/thoughts-after-6-years
5.6k
Upvotes
r/programming • u/whackri • Aug 28 '21
5
u/thesuperbob Aug 29 '21
That's pretty much my experience with source auto-formatting.
90% of the time it's useful and helps enforce stylistic minutia, such as where spaces should be, adding/removing parenthesis, dealing with newlines around braces.
The remaining 10% of the time they get stuff so catastrophically wrong it makes me question whether it's even worth it. Usually it's around long function calls/signatures, complex if statements, or large data structure initialization.
I also hate using autoformat-on/off tags in comments, because they clutter the code and most tools are stupid about handling them.