From: Stephen W. <st...@ic...> - 2008-02-18 19:45:14
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Larry Doolittle wrote: > Guys - > > On Sun, Feb 17, 2008 at 12:19:12PM -0800, Cary R. wrote: >> --- Michael Witten <mfw...@MI...> wrote: >>> However, that was an uncharacteristic outburst of enthusiasm >>> for tabs, which I've tried to use of recent. >> Tabs save space and depending on your setup key strokes as well, but in >> todays world I'm not so certain that the space savings is an issue and >> many editors can be configured to automatically convert tabs and spaces >> depending on preference. > > I'm almost embarrassed to have brought up the subject in the first > place. If the choice is between reliable, inconsistently spaced code, > and buggy beautiful code, I'll take the former every time. It's become pertinent these days as more and more people are contributing. Here's my take on indent styles. My take on tabs vs. spaces comes from somewhat older (maybe "historic") GNU standards mixed in with personal experience and pragmatism. I'm not stuck-up about it. But I do insist that the code should be viewed the way the writer wrote it. In particular, it bothers me immensely when I see souce code clearly written by a vi user with tabs set to 4. It's unreadable! Either do not use tab characters (i.e. leading spaces instead) or stick to the standard tab=8 and use tab followed by spaces to get the desired position. I think the above pretty much rules out BusyBox coding style as I grasp them from this conversation since an 8-place tab for every indent would be hopelessly too deep for code with any nesting complexity. Expecting code format to survive viewers adjusting indent for personal taste is unrealistic. As for the actual indent position for each level of nesting, I tend to use 6, although I will sometimes shrink that to keep lines from falling too far off the end. The rest is pretty much an accident of my emacs configuration:-P - -- Steve Williams "The woods are lovely, dark and deep. steve at icarus.com But I have promises to keep, http://www.icarus.com and lines to code before I sleep, http://www.picturel.com And lines to code before I sleep." -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFHueA/rPt1Sc2b3ikRAiZ+AKDW7PJDt3mzYZ7zCqq03PfmeeY+YwCeMagj cevlyt/GvnHF+YBskmVwprc= =FtqO -----END PGP SIGNATURE----- |