Hacker News new | ask | show | jobs
by bostik 904 days ago
Code reformatting is, apparently, surprisingly hard. This classic article has popped up on HN a few times over the years: https://journal.stuffwithstuff.com/2015/09/08/the-hardest-pr... (one reappearance at https://news.ycombinator.com/item?id=30566111)

So I can understand why such a feature remains behind an experimental flag. "But you are not touching code, only reformatting comments!" - well, not just thta. Adding whitespace and N+1 effectively empty lines will at some point cascade into whatever logic the wider code formatter will have to consider. The number of edge cases must be non-trivial.