[Mono-list] Style
Patrik Torstensson
totte@labs2.com
Fri, 1 Mar 2002 09:56:26 +0100
Hm.
Why don't we just follow the MS guidelines of coding to the framework.
They also include formating guidelines (if I remember correct).
(personally, the new guidelines sucks! They mess up the code.)
- Patrik
> -----Original Message-----
> From: Jason Diamond [mailto:jason@injektilo.org]
> Sent: den 1 mars 2002 09:42
> To: Mono-List
> Subject: Re: [Mono-list] Style
>
>
> 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
>
>
>
> _______________________________________________
> Mono-list maillist - Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>