[Mono-list] Style

Jason Diamond jason@injektilo.org
Fri, 1 Mar 2002 00:41:58 -0800


Thanks for the updated guidelines! But there are some constructs that I'm
still not sure about:

(I'm just guessing as to what you might want in these examples. Please
correct me.)

// try/catch/finally
// braces on the same line?
try {
    Foo ();
} catch {Exception e) {
    Bar ();
}

// switch
// indent the cases?
switch {
    case 0:
        Foo ();
        break;
    default:
        Bar ();
        break;
}

// indexer
// space before the open bracket?
string this [int i] {
    get {
        return foo;
    }
}

// what about invoking an indexer or array?
// space before the open bracket?
string foo = bar [1];

// namespace
// brace on the same line?
namespace System {
}

// how do we indent long parameters?
void Method (int this, string method, bool has, char way, float too,
    double many, byte parameters)
{
}

// i actually prefer this
void Method (
    int this,
    string method,
    bool has,
    char way,
    float too,
    double many,
    byte parameters)
{
}
// but you guys seem very whitespace conscious.

What about naming guidelines? PascalCase, camelCase, _leading_underscores?

Should the example for "Missing implementation bits" throw
NotImplementedException instead of a generic Exception?

I'm not trying to start any sort of debate. I just want to know what you
want so that I can make sure to give it to you. :-)

Thanks,
Jason