3 ms·
If you want One True Indentation Style for a language, then make it a part of the language, instead of leaving it to a style guide or an external program.
by spc476 14y ago
If you want One True Indentation Style for a language, then make it a part of the language, instead of leaving it to a style guide or an external program.
- ShardPhoenix 14y agoHaving it externally can be an advantage in that it doesn't matter if you have an extraneous space when you type the code in because it will be cleaned up by the formatter, whereas making it part of the language makes that an error (and possible quite a confusing one).
- spc476 14y agoIt leaves space (pun intended) for bike shedding, or for inadvertently checking in code that voilates the coding standards. If you really want One True Format, then make it part of the language spec.
- mheathr 14y agoIf a tool exists to format the code, it is of no consequence that a check in violates the formatting, as when that code is actually viewed it can (and should be) passed through that tool ahead of time such that the check in which violates the formatting guide lines is never actually viewed as such.