python vs perl lines of code

Edward Elliott nobody at 127.0.0.1
Wed May 17 14:07:17 EDT 2006


Mirco Wahab wrote:

> Maybe somebody would change his style
> and had a lot of such statements before:
> which can be expressed in one
> line:
> This has a 1:4 line count then.
> 
> Or, somebody used identifier like:
> and later:
> and saved ~40% characters.
> You got my point? ;-)

Hey I completely agree that line counts leave out a lot of information. 
Measures of the code like complexity, readability, work performed, etc
hinge on many more important factors.  I don't pretend that lines of code
represents any indication of inherent superiority or fitness.

But line counts do convey some information.  Even if it's only how many
lines a particular programmer used to convey his ideas.  Real-world and
average-case data are more compelling than theoretical limits on how
compact code can be.  Besides compactness isn't the point, communication
is.  Maybe line count is a good rough first-cut approximation of that. 
Maybe it's not.  Probably it's both, depending on the case.  Talking about
the numbers can only shed light on how to interpret them, which as always
is 'very carefully'.

I'm not saying lines of code necessarily reflects anything else.  All I'm
saying is, I noticed some properties of my code.  I'd like to know what
objective properties others have noticed about their code.  This is not
meant to be a comparison of languages or programming technique, just a
sampling of collective wisdom.  That always has value, even when it's
wrong.

By the looks of it, this group is uninterested in the discussion.  Which is
fine.

-- 
Edward Elliott
UC Berkeley School of Law (Boalt Hall)
complangpython at eddeye dot net



More information about the Python-list mailing list