Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!europa.chnt.gtegsc.com!news.mathworks.com!tank.news.pipex.net!pipex!dispatch.news.demon.net!demon!uknet!newsfeed.ed.ac.uk!edcogsci!jeff
From: jeff@aiai.ed.ac.uk (Jeff Dalton)
Subject: Re: Future of Lisp
Message-ID: <DD3x1n.2nw@cogsci.ed.ac.uk>
Sender: usenet@cogsci.ed.ac.uk (C News Software)
Nntp-Posting-Host: bute.aiai.ed.ac.uk
Organization: AIAI, University of Edinburgh, Scotland
References: <ZIGGY.95Jul26155006@montreux.ai.mit.edu> <3v776o$c3s@owl.csusm.edu> <3v8bnv$1pe@usenet.rpi.edu>
Date: Thu, 10 Aug 1995 18:08:11 GMT
Lines: 75

>>> - beautiful syntax (well, ok, I may be a little biased on this one).
>
>>This is Lisp's greatest downfall.  It seems that all Lispers believe that 
>>Lisp has a beautiful syntax-- but to a non-Lisper, it's horrid.  I've 
>>tried to learn Lisp quite a few times now, and every time I've given up 
>>in disgust over the overdose of parenthesis.  [...]
>
>>The problem appears to me to be in the books; every one assumes that the 
>>parenthetical notation is easy and intuitive, and it just never ceases to 
>>throw me.  I can understand writing that code with a good editor to check 
>>parens, but reading it is (right now) horrible!  Is Lisp just not 
>>intended to be read, or is it something else?

I can tell you why it's readable to me and to a number of other Lisp
programmers.  It may not account for all of them, of course.

Don't read the parentheses.

In well-indented Lisp code, it is not necessary to pay attention to
individual parens, except in a few cases where you'd usually have to
do the same thing in other languages.  The "pattern" of parens should
reinforce the sense of the indentation, so that the parens help
without getting in the way.

Remember that Lisp uses a Polish prefix notation so that, except for
operations that can take differing numbers of arguments, parens
aren't actually needed at all.  And in most of the cases where
parens are needed, the indentation provides the same information.
This leaves a few expression-on-one-line cases where you may
have to pay attention to indivudual parens.

Such advice won't instantly make Lisp readable.  Some practice in
writing Lisp and in **reading well-written Lisp** will help.

>The biggest problem is formatting, not the parenthesis.  If indented
>well, then Lisp becomes _far_ easier to read than C (at least to me).
>If not...

Just so.  The indentation is crucial. 

>Just like C, however, everyone has their own 1TBS (1TPS, I guess).  
>That is probably the hardest part of getting a handle on things.
>
>>I DO want to learn Lisp, but it's frustrating!

For learning, you might find Scheme better than Common Lisp, because
it's a much smaller language.  OTOH, Common Lisp gives you more
built-in stuff to play around with.

>I recommend Winston and Horn's book.  I first learned Lisp from the
>second edition, and gave that one to a friend who needed to learn it
>when I got the third edition.  It has an AI focus in the later
>chapters, though.
>
>For more advanced stuff, Paul Grahm's (sp?)  book, "On Lisp," is 
>facinating.  He does things with Lisp and Scheme that might
>qualify as witchcraft...

These days, you want the 3rd edition of Winston and Horn.
I'm not sure it's the best book for learning Lisp, but neither
do I have a definite alternative to recommend instead.

The Abelson and Sussman _Structure and Interpretation of Computer
Programs_ is in certain ways the best Lisp text, though it uses
Scheme.  It's oriented towards teaching concepts rather than
teaching the language, which is to my mind better.

Norvig's _Paradigms of AI Programming_ is also good.  It's probably
the best Common Lisp text overall.  Though it's more advanced than
Winston and Horn, an experienced programmer might well be able to
learn Common Lisp from Norvig's into chapter.

All of these books good sources for well-written code.

-- jeff
