[Mono-list] Style

Gaurav Vaish gvaish@iitk.ac.in
Fri, 1 Mar 2002 16:46:39 +0530


----- Original Message ----- 
From: "Piers Haken" <piersh@friskit.com>
To: "Mono List" <mono-list@ximian.com>
Sent: Friday, March 01, 2002 16:08
Subject: RE: [Mono-list] Style


: the hungarian camp (eg. http://go-mono.com/cm/cormissing.js) but I
: wouldn't argue that it be adopted for Mono for the same reasons.

    Ya, actually I prefer this format:

class myClass
{
    public void myMethod(p myParam1, p2 myParam2)
    {
        // my definition
    }
}

    What more, it looks pretty descent in folding editors like SharpDevelop ;-)



Cheers,
Gaurav Vaish
http://home.iitk.ac.in/student/gvaish
http://calendar.yahoo.com/mastergaurav
---------------------------------


: 
: Piers.
: 
: -----Original Message-----
: From: Patrik Torstensson [mailto:totte@labs2.com] 
: Sent: Friday, March 01, 2002 12:56 AM
: To: Jason Diamond; Mono-List
: Subject: RE: [Mono-list] Style
: 
: 
: 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
: > 
: 
: _______________________________________________
: Mono-list maillist  -  Mono-list@ximian.com
: http://lists.ximian.com/mailman/listinfo/mono-list
: 
: _______________________________________________
: Mono-list maillist  -  Mono-list@ximian.com
: http://lists.ximian.com/mailman/listinfo/mono-list