I would assert that white-space is significant in *ALL* programming
languages, wether or not the *TOOLS* that process a language care about it.
This is because the indentation provides so much information to the
programmer. The first thing I'll do when I get some badly formatted code
that I need to understand is fix it, because it's imperative to it's
understanding.
For example, in Python I've never made the following mistake:
if (foo)
if (bar) printf("Some message\n");
else
printf("foo failed!\n");
This usually arises because I had the printf in there, then needed to add a
test in there which suddenly broke the code. For those of you unfamiliar
with C, the "else" above matches the "if (bar)", not the "if (foo)", even
though the indentation tells us that I intended it otherwise.
Also, python isn't quite as strict as some people think:
[root@dhcp-148 tmp]# python
Python 1.5.2 (#1, Jul 5 2001, 03:02:19) [GCC 2.96 20000731 (Red Hat Linux
7.1 2 on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> print 1; print 'b'; i = 5; print i
1
b
5
The only somewhat legitimate complaint about the lack of braces is that you
can't bounce between matching braces in your editor. Which is why I made
an extension to vim which allows me to do "(" and ")" to move to the top
and bottom of a block of code by using the indentation information.
Python is a fine language, which after over a decade of programming in C
has finally brought back the joy of programming I haven't had for a very
long time. The "weird indentation thing" is often quoted by people as a
reason they aren't using it, but I've never heard that from somone who's
actually USED Python.
I *LITERALLY* did not have to change my indentation style *AT ALL* when
switching from C to Python. Developing a consistent indentation style is
something that I worked on VERY early in my programming career, however.
Sean
--
Why isn't phonetic spelled the way it sounds?
Sean Reifschneider, Inimitably Superfluous <[EMAIL PROTECTED]>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python