python vs perl lines of code

Michael Tobis mtobis at gmail.com
Fri May 19 02:01:50 CEST 2006


> According to your silly rule the shortest book on a subject would be the
> best. Now why is that false?

No, according to the rule, the shorter of two books **containing the
same information** would be best.

I don't think I'm a zealot. The original quote said "all else equal".
Certainly legible code is better than, hence not equal to, illegible
code.

I would say that having played Python golf once, the complexity of the
competitive keystroke-minimizing code is much higher than the
complexity of the equivalent sane, readable, maintainable code.
(Actually, it also turns out to involve a good deal of coding that
isn't in the final source, but let's not go there.) The point is I did
NOT say he programs best who *types* least, and I don't believe that.

In fact, that's what makes the comparison interesting. I had always
thought that Pythonistas type more than Perlists, though I prefer
Python anyway. The presumption was based on the fact that  Perl (as
language and culture) takes delight in saving keystrokes at the expense
of clarity ($_ and all that) while Python makes no special effort in
that direction.

If real world Python code is substantially more terse *despite* this
cultural difference, it is a fact worthy of some note.

Let me add my voice to those clamoring for Edward to release his code
while I'm here, though.

mt




More information about the Python-list mailing list