Indent Style - Compact Control Readability Style

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 (1751–1836)

    There are many things children accept as “grown-up things” over when they have no control and for which they have no responsibility—for instance, weddings, having babies, buying houses, and driving cars. Parents who are separating really need to help their children put divorce on that grown-up list, so that children do not see themselves as the cause of their parents’ decision to live apart.
    Fred Rogers (20th century)

    Compare the history of the novel to that of rock ‘n’ roll. Both started out a minority taste, became a mass taste, and then splintered into several subgenres. Both have been the typical cultural expressions of classes and epochs. Both started out aggressively fighting for their share of attention, novels attacking the drama, the tract, and the poem, rock attacking jazz and pop and rolling over classical music.
    W. T. Lhamon, U.S. educator, critic. “Material Differences,” Deliberate Speed: The Origins of a Cultural Style in the American 1950s, Smithsonian (1990)