3 ms·
> have to fix it up manually Any editor written or actively maintained in the current century does this automatically for you. (Yes that obviously includes Ema
by teiferer 2mo ago
> have to fix it up manually
Any editor written or actively maintained in the current century does this automatically for you. (Yes that obviously includes Emacs and Vim).
- rurban 2mo agoIn gdb? It's a shame gdb picked python
- jcgl 2mo agoBut that doesn't work if the indentation carries semantic meaning; you can't change the indentation without changing the meaning. Maybe you can correct syntactically-incorrect spacing (e.g. change 3 spaces to 4 spaces), but not much beyond that.
- teiferer 2mo agoThe Vim I use increases the indent of a code block when I ask it to. Just like it places a closing curly brace at the point where I tell it to. I don't see the fundamental difference between these two things.
- Georgelemental 2mo agoBut you have to ask it to, and by the right amount for every line/sub-block. If you accidentally get one line wrong, it could be a silent bug. In a language without significant indentation, as long as braces are preserved, once you are done moving code around a single autoformat will fix everything including nested blocks. And if you forget a brace, it's an error instead of a silent bug
- vrighter 2mo agono, they can't in indentation based languages. changing indentation implies changing the code. A formatter isn't allowed to do that