3 ms·
Code reformatting is, apparently, surprisingly hard. This classic article has popped up on HN a few times over the years: https://journal.stuffwithstuff.com/201
by bostik 3y 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-program-ive-ever-written/ https://journal.stuffwithstuff.com/2015/09/08/the-hardest-pr... (one reappearance at https://news.ycombinator.com/item?id=30566111 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.