From: Jonathan Monsarrat
Subject: Re: Lines of Code comparison: Lisp vs. C++
Date: 
Message-ID: <JGM.95Feb2102843@vegas.cs.brown.edu>
Hi! This is Jonathan Monsarrat writing to you from Brown University.

> It turns out that the C++ implementation is 6.6 times longer then the
> Lisp implementation 

As one of the authors, I have some comments. There were two programmers
for this set of code. One programmer was instructed to make the C++
code "just like Lisp". One programmer (me) was a bit renegade and did
it the real C++ way, because I wanted the code to be readable.

The C++ code that is "just like Lisp" is truly horrid, as Kostadis,
the other programmer admits. However, the idea was to make it model
the Lisp code in the book exactly. To pretend that C++ is Lisp was a major
feat for Kostadis to accomplish that he should be, err, proud of possibly.

Anyway, I think it is a mistake to compare C++ #lines and Lisp # lines
when the C++ code is trying to pretend it's Lisp.

The other code, which I wrote, is about 5 times more compact, and a
ton more readable because C++ has classes, and other functionality.
I think I did chapters 5, 8, 9, and part of 4.

Also, please note that fewer lines does not mean more readable. Look
at the Lisp code, and look at the C++ code, and you'll see that things
are better modularized, well laid out, and much more friendly in the
C++ mode. Having intimate knowledge of this particular library, I can
say it is at least true for this set of code. My experience is that it
is also true in general.

C++ wins hands down. Lisp people, get with the 80s.  (p.s. it's the 90s)

-Jon
%! Jon Monsarrat     ···@cs.brown.edu     moderator, comp.sources.postscript %!
9 9 scale 9 9 moveto(qll-??LHHL??llH?hH7t,·······@){dup 10 mul rotate 80 lt{4 0
rlineto}{4 0 rmoveto}ifelse}forall stroke showpage