Peter Corlett abuse at cabal.org.uk
Wed Aug 22 16:20:11 BST 2007

On 22 Aug 2007, at 15:38, Paul Makepeace wrote:
> On 8/22/07, Peter Corlett <abuse at cabal.org.uk> wrote:
>> You and your editor have to get over the significant whitespace, then
> ..which presumably should take no more than about 10s.

You misunderstand the way that using an editor drops into the  
subconscious. It's easy enough to learn and appreciate Python's  
indentation rules, but a lot longer for one's finger macros to pick  
it up.

For example, I had to change how I edit code. For other languages,  
the scope is defined by printable characters. I'm using Emacs and it  
is smart and syntax aware with a magic TAB feature that I have grown  
to love and embrace, because I can hit TAB when on a line of code and  
it will reindent it. So to write code I just tap away, tap TAB  
occasionally and it indents itself. If I tap TAB and it goes into the  
wrong column, I know there's a bug that I need to go and fix, which  
saves a *lot* of time staring at Perl's error output trying to work  
out where I cocked up.

Python breaks this workflow. Emacs does its best, and instead cycles  
round the possible indentations, most-likely first. My workflow  
*nearly* works, but it is too easy to make a mistake that is not  
immediately obvious. So it slows me down because I now have to  
concentrate on making sure that the indentation of the code is still  
what I intend. This is easier said than done when it comes to re- 
editing some code I wrote six months ago and forget the exact details.

It's even more fun when you have to indent or dedent the whole block  
- in Perl, C, Erlang, HTML, whatever, I can just stick braces around  
it and go down pressing TAB for each line. In Python, and only  
Python, this will break the code.

This isn't to say that Python is bad because of it, it's just that  
it's much more different to Perl than, say, Java is.

More information about the london.pm mailing list