Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] Coding Styles . . .

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Bas van Gils <bas.vangils AT cs.kun.nl>
  • To: sm-discuss <sm-discuss AT lists.ibiblio.org>
  • Subject: Re: [SM-Discuss] Coding Styles . . .
  • Date: Wed, 18 Jun 2003 09:30:28 +0200

On Tue, Jun 17, 2003 at 11:52:55AM -0400, Dufflebunk wrote:
> I'm mostly to blame for those tabs. When I rewrite a lib I usually use
> tabs rather than spaces because hitting the space bar 12 times or the
> backspace 12 times isn't my idea of fun for indentation.
> [snip]

Hi,

Having a nice coding-style is IMHO nice. In languages like Python it is
essential, since code-blocks are recognized by their indentation instead of
tokens like "begin/end" or "{ }". Anyway, when I started using Python a while
ago, I did some searching on the Web and found

http://www.python.org/peps/pep-0008.html

particularly useful. not only for Python-code, but for coding in general. As
it turns out: the prefered way of doing things in Python is to use 4-space
indents.

Like Dufflebunk said: hitting the space-bar n times (n = big number) isn't
fun. I learned that most editors can be configured to use "softtab"ΒΈ which
basicallly expands a tab into spaces. In vim you'd have to use:

set expandtab
set shiftwidth=4
set softtabstop=4
set tabstop=4

I'm not sure how to configure Emacs to do this, since I stopped using this a
long time a go.

Hope this suggestions helps ;-)

Yours

Bas



--
/* _\|/_
(o o)
+----oOO-{_}-OOo--------------------------------------------------------+
|drs. Bas van Gils <Bas.vanGils AT cs.kun.nl> - http://www.cs.kun.nl/~basvg|
|PGP Key fingerprint = 3805 664A F24E 90D5 6A77 C624 E13D 0440 2768 A493|
+----------------------------------------------------------------------*/




Archive powered by MHonArc 2.6.24.

Top of Page