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 Puritans, to keep the remembrance of their unity one with another, and of their peaceful compact with the Indians, named their forest settlement CONCORD.”
    —Ralph Waldo Emerson (1803–1882)

    “I have not ceased being fearful, but I have ceased to let fear control me. I have accepted fear as a part of life, specifically the fear of change, the fear of the unknown, and I have gone ahead despite the pounding in the heart that says: turn back, turn back, you’ll die if you venture too far.”
    —Erica Jong, U.S. author. In an essay in The Writer on Her Work, ch. 13 (1980)

    “I might say that what amateurs call a style is usually only the unavoidable awkwardnesses in first trying to make something that has not heretofore been made.”
    —Ernest Hemingway (1899–1961)