3 ms·
Because code formatters cannot work on whitespace languages like Python. They can't adjust the indentation for you because they have to assume that the given in
by ghoward 4y ago
Because code formatters cannot work on whitespace languages like Python. They can't adjust the indentation for you because they have to assume that the given indentation is intended.
It also makes a lot of other automatic tools for dealing with source code harder to write, if not impossible.
- chriskrycho 4y agoThis is simply not true.There are highly-used and highly-usable formatters for Python, Elm, Haskell, F♯, etc., all of which are whitespace-sensitive/indentation-dependent languages. "Adjusting indentation" is far from the only thing formatters do, and even things like breaking or wrapping expressions over multiple lines can certainly be done in all of these languages.
- smegsicle 4y agoadjusting indentation may be "far from" the only thing your formatters do, but it's the only thing i ever want mine to do