Braces

01 Dec 2011

Please can we have the open braces align vertically to the close braces.

Although I love the format, I spend ages trying to match them up,

Cheers

Ceri

02 Dec 2011

+1

To be clear, I am in support of this format:

for(;;)
{
    printf("Looping...\n");
}

and not this format ;)

for(;;)
    {
    printf("Looping...\n");
    }
02 Dec 2011

"The great thing about standards is there are so many to choose from"

mbed is about conventions, so I wanted to choose one style. There are loads of takes on coding style, and even more religious battles on the web, but primarily in C it comes down to K&R vs. OTBS. I chose K&R because looking across the diversity of our users, vertical screen real-estate won. Whilst some of us have the joys of 2-monitor HD setups, we still have many users on IE6 with really old screens :) Basically it was a pragmatic decision to choose a convention for mbed.

We'll look to see if we can add brace matching to the editor, which might help coding even further. Hope that'll numb the pain :P

Simon