Alien whitespace eating nanovirus strikes again!

Jim Meier fatjim at home.com
Thu Jun 3 13:25:17 EDT 1999


Martijn Faassen wrote:

> Mark Hammond wrote:
>
> [Aahz Maruch does not like block indenting a lot]
>
> > Of course, this is your HO.  Many other people (including myself) found that
> > a few weeks in, they thought "this is great", and many years later, can't
> > believe that other language still hold on to the "old ways".  When I take a
> > quick look at some of the new little languages referenced on this newsgroup,
> > believe it or not, my _first_ reaction is "God those block closers are
> > stupid and ugly" :-)
>
> I never was much afraid of this indentation means block structure thing,
> probably not having been spoiled by other languages that are horrid and
> practice it, so it was mostly a neat discovery. Now, I am less than a
> year in and I already have the same reaction to other languages. "Neat
> language..but ick, what are those block closers for?" Just the other day
> I was looking at some pseudocode in a book and my eyes kept stumbling
> over the block closers.

Ditto about not being afraid of the indentation. I've been rabidly happy about
using indentation properly ever since I moved up from a commodore vic-20: in the
vic's BASIC, you typed a line number and then just typed until you had trouble
reading the line - it would just wrap around the 20-character wide screen. Moving
up to a DOS machine with MS QBasic, I was very releived to be allowed to indent my
programs properly. But QBasic has crazy block open/closures: each type of
statement is different!

C:
if(cond) {
    foo();
} else {
    bar();
}

while(1) {
    foo()
}

Python:
if cond:
    foo()
else:
    bar()

while 1:
    foo()

BASIC:
if cond then foo else bar
-or-
if cond then
    foo()
else
    barr()
endif

while(1)
    foo()
wend


> I must say that Emacs Python mode helps tremendously in this respect,
> though. Without it or something similar block indentation wouldn't be as
> easy (though I've found I can code in Windows Notepad too if I really
> want to :).

Oh, ditto. I just *love* (x)emacs now, though I would really like it to take far
less memory and be extendable with python.


Wow, talking about old H/W makes me sound old - I'm only 19!
-Jim





More information about the Python-list mailing list