----- Original Message -----
From: "Tim Hammerquist" <tim / vegeta.ath.cx>


> Gavin Sinclair graced us by uttering:
> > My two reasons for disliking Python's aesthetics:
> >
> > - indentation-as-syntax
> >
> >   At first I thought it was a nice idea, but I actually find it
> >   difficult to read.  A class definition, especially, should
> >   have an explicit end.  Most importantly, though, it's not
> >   advanced-editor friendly.
>
> I've never found it difficult to read, and actually was really
> excited about it.  I found a few instances where it was a bit
> awkward, but overall I thought it was a good idea.  Editors do
> seem to have trouble with it at times, but I didn't notice a huge
> problem.
>
> In the end, though, I don't miss it as much as I thought I would.
>
> But this is also the greatest way in which Python has contributed
> to the modern coding community.  For example, I've never, ever,
> ever seen a Python function definition like this.
>
>     def foo(arg1, arg2)
>     do_stuff()
>     do_some_more_stuff()
>     while some_condition:
>     do_some_conditional_stuff()
>     for var in some_list:
>     do_more_stuff_with(arg1)
>
> ....I wish I could say the same for Perl.  ;)

Since Perl has braces-as-syntax instead of
invisible-undetectable-because-its-not-there-whitespace-as-syntax, you can get
vim/emacs/whatever to reindent Perl for you.

Of course, you never need to reindent Python code, except for when:
 - you want to change the indent level from 8 to 3, e.g.
 - you cut and paste some code into a loop

My objection may not play out much in practice (I'd never practice it because
of the explicit self parameter!), but it is a very strong (and stubborn)
philosophical objection for me.

> > - explicit "self" parameter to methods
> >
> >   I absolutely detest this.  I *had* to stop reading my Python
> >   book when I discovered this.  I picked it up again recently
> >   to find out if the nightmare was actually true.  It was.
>
> I agree totally, completely, and unrelentingly.  I didn't like
> 'this' in C++, I didn't like 'my $self = shift;' in Perl, and I
> really didn't like Python's 'self' shattering my dreams that
> Python might actually be an elegant OO language.

Nicely put.

> Tim Hammerquist

I'll conclude with one (new) feature from Python that makes me green with envy:
list comprehensions.  For those who don't know what that means, here's an
example:

 Ruby:  squares_less_than_10 = numbers.find_all{|i| i<10}.map{|i| i^2}

 Python: squares_less_than_10 = [x^2 for x in numbers if x < 10]

Don't get me wrong, I love Ruby's powerful array-manipulation capabilities.
But list comprehensions are soooo cooool!

Cheers,
Gavin