Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!newsstand.cit.cornell.edu!portc01.blue.aol.com!news-peer.gsl.net!news.gsl.net!howland.erols.net!netcom.com!vfr750
From: vfr750@netcom.com (Will Hartung)
Subject: Re: ANSI CLISP: strengths vs. weaknesses?
Message-ID: <vfr750Dz0ppJ.LtL@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: <slrn55n3fg.5p.psci@teleport.com>
Date: Wed, 9 Oct 1996 16:56:07 GMT
Lines: 99
Sender: vfr750@netcom21.netcom.com

psci@teleport.com (Brett) writes:

>As a programmer in various other languages (procedural), but a recent LISP
>onlooker, I am now considering LISP more seriously. And I am curious to
>know what other professionals see as the greatest weaknesses of LISP
>(various dialects). I see a lot about its advantages, but wish to peer
>deeper into this language. 

>Is the code easily readable - code of others, esp? Or does it suffer from 
>problems similar to c's readability? Is it easily packaged into modules 
>of some sort? 

Well, let me chime in as a fellow novice trying to make heads or tails
of the Lisp World.

It is difficult to judge the readability of a language you do not
know. In the beginning, I found Lisp very opaque to an outsider well
versed in the C/Pascal camps of computer programming. At a casual
glance, the Lisp style and the C/Pascal style seem to have very little in
common.

I think this is a common complaint about Lisp. I'd say that it is
fairly trivial for an experience Pascal programmer to switch to C, and
vice-a-versa, as they are pretty similiar. Since many programmers cut
their teeth on Pascal or C, they are just that more frustrated because
they feel that they can't carry over any of that knowledge to jumpstart
themselves into Lisp.

Having gone through the transition myself, I don't really believe that
is true, but it certainly looks like at a glance.

It turns out, once you've spent any effort into learning Lisp that
like the semi-colons in C/Pascal, the parens just drop out of your
code. Once the parens drop out, you start to see the structure of the
code rather easily (properly indented of course, but I wouldn't want
to read badly formatted C either). 

After you start seeing the structure of the code, then understanding
the program becomes a vocabulary problem.

And there's the rub. C/Pascal use lots of little characters and
syntax constructs that just don't exist in Lisp. You can look at Lisp
as just a bunch of function calls with effectively no syntax. What's
CONS? What's MAP? What's LAMBDA?! Oh God, this is all in GREEK! And it
is EVERYWHERE!

To be honest, I have a Greek phobia. I hate Greek letters, and I can
safely say that the word "LAMBDA" kept me away from Lisp,
irrationally I admit, for many years. Whenever I see a Greek letter in
a book, I assume that there is some other significance to that letter
than what is shown, and that significance is assumed and never
defined. Otherwise, why not use A or X or something else? Pet peeve,
don't mind me.

CL is a LARGE language, and it has a HUGE vocabulary. When I look at
Lisp Code, I have to wonder how much here is provided by the language,
and how much is defined in the program.

Actually, that's not true. CL is actually a rather tiny language. It
just has a big library.  :-)

To read the Lisp code, you need to have Cltl2 handy to look up the
multitude of functions that you may not know. That lack of vocabulary
makes it difficult to read, but experience eliminates that. 

Plug for "ANSI Common Lisp" by Paul Graham here. He's got a nice CL
reference in the back, and a fine, fine book in the front. If you want
to learn Lisp, this book is a requirement, IMHO. And if you have
difficulty following the book the first time through, Paul's enthusiasm
for the language will either scare you away from it completely, or
it'll grab your soul so tight you'll never be able to let go.

My only other difficulty with the language is the conventions that are
used by Lisp Coders that I may not know. If you look at Lisp code,
especially CLOS code, there are lots of references to things like:
    (func :one a :two b :three c)
 or (defun xyz (a b &rest c d &optional (e 'yow)))

As a beginner, I'm not sure if the colons and ampersands are required,
or convention, or what. They distract me when reading the code, kind
of like greek letters do. But, once you "know", they drop out and are
no longer a distraction.

Of course, I should mention that I STILL don't know much beyond
*global*, but I admit I've been focusing on Scheme rather than Lisp
because the books are more CS oriented than AI oriented, and I'm not
interested in AI.

>I hope to be further intruqued by the language!

Be careful what you wish for... :-)

Enjoy!


-- 
Will Hartung - Rancho Santa Margarita. It's a dry heat. vfr750@netcom.com
1990 VFR750 - VFR=Very Red    "Ho, HaHa, Dodge, Parry, Spin, HA! THRUST!"
1993 Explorer - Cage? Hell, it's a prison.                    -D. Duck
