[Mono-devel-list] REPOST: Mono class layout
Duncan Mak
duncan at ximian.com
Wed Nov 12 15:44:32 EST 2003
On Tue, 2003-11-11 at 15:31, Hayes, Dennis wrote:
> /Rant on
> Does anyone have so much spare time that they would like to explain why
> sometimes the bracket goes on the same line and other times it goes on the
> next line.
This is what I remember from reading K&R:
* braces on a new line for things that cannot be nested, i.e. functions.
* braces on things that can be nested, i.e. if/else, try/catch.
So, if we were to really follow these two principles, then the brace for
classes should not be in a newline, because we can put inner classes.
Well, there is always an exception, right? ;-)
By now, I just do it out of habit and because of my tuned sense of
aesthetics (I just think this style looks the best).
Duncan.
More information about the Mono-devel-list
mailing list