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:

    “What compact mean you to have with us?
    Will you be pricked in number of our friends,
    Or shall we on, and not depend on you?”
    —William Shakespeare (1564–1616)

    “There has been something crude and heartless and unfeeling in our haste to succeed and be great. Our thought has been “Let every man look out for himself, let every generation look out for itself,” while we reared giant machinery which made it impossible that any but those who stood at the levers of control should have any chance to look out for themselves.”
    —Woodrow Wilson (1856–1924)

    “Each child has his own individual expressions to offer to the world. That expression can take many forms, from artistic interests, a way of thinking, athletic activities, a particular style of dressing, musical talents, different hobbies, etc. Our job is to join our children in discovering who they are.”
    —Stephanie Martson (20th century)