Is there a best coding style for indentations (same line, next line)?
- by Luis Soeiro
I prefer Pascal-like coding style, where the beginning and ending of a code block are on the same column. I think that it is easier to read and to handle cut and paste than the other kind of coding style.
The style I prefer (Pascal-like):
void fooBar(String s)
{
int a;
int length=s.length();
for (int i=0;i<length;i++)
{
if…