Compact Control Readability Style
This style makes it easy to skim the left edge of the code for control statements (whereas styles like 1TBS make statements such as "else" harder to see because they are after an end bracket on the same line). However it keeps the code more compact than styles like the Allman style, by putting opening brackets at the end of lines (as opposed to on their own lines).
// In JavaScript if (x == y) { doSomethingA; doSomethingB; } else { doSomethingC; doSomethingD; }Read more about this topic: Indent Style
Famous quotes containing the words compact, control and/or style:
“The powers of the federal government ... result from the compact to which the states are parties, [and are] limited by the plain sense and intention of the instrument constituting that compact.”
—James Madison (17511836)
“If someone does something we disapprove of, we regard him as bad if we believe we can deter him from persisting in his conduct, but we regard him as mad if we believe we cannot. In either case, the crucial issue is our control of the other: the more we lose control over him, and the more he assumes control over himself, the more, in case of conflict, we are likely to consider him mad rather than just bad.”
—Thomas Szasz (b. 1920)
“Style is the dress of thoughts; and let them be ever so just, if your style is homely, coarse, and vulgar, they will appear to as much disadvantage, and be as ill received, as your person, though ever so well-proportioned, would if dressed in rags, dirt, and tatters.”
—Philip Dormer Stanhope, 4th Earl Chesterfield (16941773)