Hacker News new | ask | show | jobs
by twinkletwinkle_ 1857 days ago
Agree that ugly is subjective. But adjusting spaces when things get refactored is bad, not because it's tedious but because it pollutes history. Changing whitespace on surrounding lines to my change makes eg `git blame` less informative. It's the same reason I believe in trailing commas.
2 comments

I acknowledge this problem while throwing up my hands at the incredible laziness of the entire profession in not employing syntactically-aware diffing.

It's our own fault, we have no excuse, and it galls me to serve a dumb line-based algorithm over the writers and readers of my code.

Ideally, what is stored in version control is just the AST, and how you or I display it is up to our own preference. Then I won't have to care about your weird indentation preferences and other style choices and you won't have to care about mine!
Agreed fully, these are my reasons too, and I'm quite sorry for not having included a trailing comma in my example :)