[Mono-list] Class Library coding standards

Tomas Restrepo tomasr@mvps.org
Wed, 18 Jul 2001 19:01:10 -0500

Hi Sean,

> * We'd like to see 8 space tabs.  If you leave the tab character, that
> is also fine.

Personally, I dislike 8 space tabs inmensly (4 is really my top limit :).
It's a pita to use in cases like this on which namespace-decl + class-decl +
method-decl already bring up three levels of indentation, for a nice total
of 24 wasted spaces. Specially bad if you're like me and like your code not
to go beyond 80 columns so it's easy to print :)

Anyway, At least, we should either use tabs or spaces, but dealing with both
is a complete mess. Although I normally prefer spaces (easier to maintain
layout), I'd prefer tabs right now so that I can still watch my code with 3
space indentations :)

> * The opening brace following a namespace, class, struct, enum, property
> or flow control unit should be at the end of the declaration line.

Horrible in class declarations if you have a class implementing three or
four interfaces, which are pretty common in .NET...

As for conventions, there should be one for variables, particularly member
ones. Right now, I'm following the common  (common in C#, that is) of using
_name for non-public member fields...

Not complaining, though.... Just pointing some things out..

Tomas Restrepo