[Shootout-list] An alternative to line counts

JP Bernardy jyp_7@yahoo.com
Sun, 20 Jun 2004 09:48:57 -0700 (PDT)


Hi,

> I'd like to propose an alternative to lines
> of code as a measure of program complexity in
> the shootout.

> [***]

Measuring the compressed size of the code is an
interesting idea, and I'd like so see the results.

Yet, since you want debate, let me point out a few
things...

* Line count is an interesting metric by itself. It
sort of measure how much code you can fit on a page,
i.e., see at one glance. Thus I suggest line counts
are kept even if another metric is used alongside.

* A terse syntax, style, etc. can be considered as an
advantage.  How would you measure that ? (Syntactic
noise can be eliminated in compression but still
impair reading)

* Cheating, as you describe it, make a language look
good only in the statistics. As soon as you see the
actual code the magic vanishes :)

* Given that two programs implement the same thing,
the "absolute information" they encode is exactly the
same, and thus all implementations are equal with this
respect! (This is not the bottom line of course; I
just want to show that the quest for "absolute
information" is a tough one.)

I conclude that measuring code size/complexity is very
difficult, largely a matter of taste.

Cheers,
JP.


		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail