[oclug] Evolution problem
Rod Giffin
rod at giffinscientific.com
Tue Jun 17 09:55:30 EDT 2003
On Tue, 2003-06-17 at 08:30, Matthew Wilcox wrote:
> On Tue, Jun 17, 2003 at 08:23:37AM -0400, Rod Giffin wrote:
> > Well, what can I say. Use an editor that inserts spaces instead of
> > tabs. Tab's are for typists, not program code.
>
> Chapter 1: Indentation
>
> Tabs are 8 characters, and thus indentations are also 8 characters.
> There are heretic movements that try to make indentations 4 (or even 2!)
> characters deep, and that is akin to trying to define the value of PI to
> be 3.
Chapter 1 of what?
If you have a structure that requires 5 levels of indentation, you'd end
up with code that goes off the right hand side of the margin. Heaven
forbid that the editor wraps it! I'd send that back to be re-written as
well. I discount the author's statement. It's heretical to use tabs in
program code. Use the space bar instead. Whatever you do, make sure
your source code is readable by a human being no matter how complex the
logic being implemented.
I don't write a whole lot of code in Python, unless I'm stuck with Zope
or embedding Python in a widget. I usually use C, C++, VGL, or Java.
The editor I use for Python is the same one I use for Java and C/C++ -
and it is currently set to use 2 spaces for indentation (default is 4).
Python likes it just fine.
> Also, you've clearly never written a Makefile [1].
Oh yes I have. I don't like the experience. There's a better model by
the way, where leading whitespace is solely for the benefit of any human
reader. (note, I said better model, not better tool.)
> And if you're
> going to write in Whitespace [2], failing to use the tab key limits
> what you can express.
>
> [1] The tabs/spaces distinction is one of the worst things about Makefiles
No kidding. Poor implementation doesn't change my opinion though. See
http://ant.apache.org Check out the paragraph that begins "Makefiles
are inherently evil as well."
> [2] http://compsoc.dur.ac.uk/whitespace/
lol. Right.
Rod.
More information about the OCLUG
mailing list