3 ms·
In theory, the ideal method would be tabs for indentation, but then further spaces for horizontal alignment if necessary. The tabs would specify exactly the log
by goerz 6y ago
In theory, the ideal method would be tabs for indentation, but then further spaces for horizontal alignment if necessary. The tabs would specify exactly the logical indentation level, and only that. This way, people can change their tab width and the code will remain well-formatted. Indenting with tabs only will not allow for horizontal code alignment. In practice, mixing tabs and spaces (not to be confused with “mixing tabs and spaces” as in “some lines are indented with tabs, others with spaces” will never work reliably (and many editors/formatters prohibit it), so I’ll just take indentation with spaces, in any real-world scenario.