[Mono-list] Style

Patrik Torstensson totte@labs2.com
Sat, 2 Mar 2002 12:39:56 +0100


Just as a short reply, I don't agree with Linus in the case of C# (it is a good reason for C) because we keep class tags, using tags etc i the files.
 
Regarding the tabs, us that live in the Microsoft word the tabs works perfectly and is per default in the msdev editor. Therefore my cache file has a lot of tabs as identing and if you look at the code in the Microsoft Visual Studio you will understand why. 
 
I agree that for this project we should use the 3 space identing and keep the lines to 80 chars (just for you emacs guys..) but now this, in MSDev it really makes the code harder to read.
 
- Patrik

	-----Original Message----- 
	From: Eric Kidd [mailto:eric.kidd@pobox.com] 
	Sent: Sat 2002-03-02 05:50 
	To: Mono mailing list 
	Cc: 
	Subject: Re: [Mono-list] Style
	
	

	On Fri, 2002-03-01 at 04:15, Miguel de Icaza wrote:
	> I try to fit as many things as possible in 110 columns, but we should
	> probably standarize in 80 columns.
	
	It would be very, very nice to fit any new Mono code into 80 columns
	whenever possible (79, actually, if you don't want to wrap in Emacs).
	
	I use big fonts on a tiny laptop screen (so I don't go blind from
	hacking too much), and much of the Mono code simply doesn't fit unless I
	shrink my Emacs fonts down to microscopic sizes.
	
	As Linus writes, in the kernel's CodingStyle:
	
	  Now, some people will claim that having 8-character indentations makes
	  the code move too far to the right, and makes it hard to read on a
	  80-character terminal screen.  The answer to that is that if you need
	  more than 3 levels of indentation, you're screwed anyway, and should
	  fix your program.
	
	  In short, 8-char indents make things easier to read, and have the
	  added benefit of warning you when you're nesting your functions too
	  deep.  Heed that warning.
	
	This is a very good argument for using 8-space identation.
	
	However, it is not such a good argument when you use anywhere from 5 to
	14(!) consecutive tabs in a source file, or include the following 238
	column line (which isn't actually the longest in Mono):
	
	---
	                                System.Diagnostics.Debug.Fail("System.Web.Cache.Dispose() Exception when closing cache entry", "Message: " + objException.Message + " Stack: " + objException.StackTrace + " Source:" + objException.Source);
	---
	
	If you're going to use huge indentation, you would make many of us happy
	by keeping it to 4 or 5 levels, and sticking to 79 columns (or at least
	the official 110 or so). ;-)
	
	Cheers,
	Eric
	
	
	
	_______________________________________________
	Mono-list maillist  -  Mono-list@ximian.com
	http://lists.ximian.com/mailman/listinfo/mono-list