[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: indent problem

From: Miles Bader
Subject: Re: indent problem
Date: Sat, 15 Jul 2006 09:50:26 +0900

"silversurfer2025" <> writes:
>> so how do I change the code to not put brackets of functions into
>>    the next line?
> OK, maybe I'll have to change myself instead of changing the standards
> which exist.. I just liked my way of writing it better, but this might
> only be habituation..

Maybe I should know better than to comment on coding style issues but:

I find that although I can adjust to almost any of the common C / C++
coding conventions (though of course I have my preferences), the
"function-beginning-brace not at the start of line" is one of the hardest
to deal with; I find it simply makes code very hard to read.

As far as I can tell this is because my brain uses a similar strategy to
Emacs for locating function boundaries: I quickly scan looking for the
function-beginning-brace, and go from there.  Braces at the beginning of
the line are unsually easy to see, as they are isolated on a line, are in a
fixed position, and are surounded by whitespace; braces at the end of a
line are not -- they blend, they become just another bit of puncuation.

For most control constructs, this "blending" is OK, your brain is probably
relying mostly on indentation to follow control structure anyway.  But I
think the beginning of the function is a more critical synchronization
point, and needs to be more strongly demarcated.

97% of everything is grunge

reply via email to

[Prev in Thread] Current Thread [Next in Thread]