[webkit-dev] Switch statement indentation

Geoffrey Garen ggaren at apple.com
Wed Dec 2 19:56:27 PST 2009


> The downside is that some code can get indented too far, which is particularly unfortunate for large switches.

We could issue a fuzzy declaration such as, "Indent case blocks, except in situations where an unreasonable amount of code would end up so-indented, causing readability problems".

Two examples of situations where indenting case blocks would cause readability problems are the JavaScriptCore interpreter and, to a lesser extent, the JavaScriptCore JIT. All of Interpreter.cpp would suddenly be indented by an extra 4 spaces, sucking up valuable horizontal real estate.

Geoff


More information about the webkit-dev mailing list