Newsgroups: comp.lang.lisp,comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!cam-news-feed3.bbnplanet.com!news.bbnplanet.com!cam-news-hub1.bbnplanet.com!news.mathworks.com!newscaster-1.mcast.net!informatik.uni-bremen.de!cs.tu-berlin.de!news.uni-hamburg.de!news.Hanse.DE!wavehh.hanse.de!cracauer
From: cracauer@wavehh.hanse.de (Martin Cracauer)
Subject: Re: Which one, Lisp or Scheme?
Message-ID: <1997Jan30.172306.23075@wavehh.hanse.de>
Reply-To: cracauer@wavehh.hanse.de
Organization: '(a (cons structive organization))
References: <slrn5e5geh.dl.yunho@csl.snu.ac.kr> 	<joswig-ya023180002001971119300001@news.lavielle.com> 	<32ecf05f.24891572@news.sime.com> <ey3915buy5s.fsf@staffa.aiai.ed.ac.uk>
Date: Thu, 30 Jan 97 17:23:06 GMT
Lines: 86
Xref: glinda.oz.cs.cmu.edu comp.lang.lisp:24981 comp.lang.scheme:18285

Tim Bradshaw <tfb@aiai.ed.ac.uk> writes:

>* Reini Urban wrote:
>> On Mon, 20 Jan 1997 11:19:30 +0100, joswig@lavielle.com (Rainer Joswig) wrote:
>>> Both Common Lisp and Scheme basics are relatively easy to learn.

>> In my eyes Common Lisp is quite hard to learn 
>> (compared to standard lisp or scheme)

>If it's possible to ask this question without provoking endless futile
>discussion, could you say why?  I've taught courses on Common Lisp,
>and it would be interesting to know what people find hard about basic CL,
>especially compared to scheme.  

>I can see that CL is very *large* & therefore intimidating compared to
>Scheme, but that can be fixed by teaching it the right way.  Scope &
>extent people find hard, but is common between them.  Different fn and
>variable namespaces make CL harder I think. call/cc makes scheme very
>much conceptually harder though for many people.

>So it would be quite interesting to know why CL is harder (or why
>scheme is harder) and how that could be fixed, if it can.

As someone who likes Common Lisp, I also found it quite hard to
learn. 

1) Some concepts were quite hard to get for me, scoping, multiple
namespaces, reader macros (understanding existing programs is a lot
easier when you got the idea that all these #-constructs are just the
same as calling an S-expression macro) and in some ways
setf-constructs. 

2) I learn best by reading existing sources. In Common Lisp, you will
face the whole range of teh language.

On the other hand, while it was hard to read such programs, it was
very useful. For example, when a sensible programmer chooses the best
sequence type for a given task. In Common Lisp, he will most likely
use constructs that you can look up in CLtL2. In C++ before STL, he
usually will implement his own stuff or use a non-standard lib and in
C people are very likely to push everyting into arrays.

3) While I liked the syntax, I found it to be pretty uncomfortable
when it comes to access sequence members and struct entries and
instance variables.

Also, the syntax for declarations is not really intuitive.

4) It is not easy to get decent performance out of Common Lisp when
you don't have an idea what makes a hashtable different from a
non-hashing assosication table and why people invented lists and why
it is useful to keep an pointer to the end of a list.

Of course, you will not write good peforming C programs also, but in C
you are likely to use arrays of inlined data members, which was for my
applications fast enough. In Common Lisp, you might end up using lists
like arrays and get no compile-time typechecking at all.

5) Usually no source-level debugging. I found it very useful to see a C
program step-by-step with variable watches turned on.

6) Profiling requires you to set up the symbols you want traced in
advance. With GNU gprof for C, you just say "profile this program" and
it uses all functions it has an entry for.

7) Environment issues. It takes some time to get used to work in a
permanent image. For example, why can't you load a package that
contains a symbol you just tried to access? Because you just triggered
the symbol to be created in the current package. Not easy to get for a
batch-language user.

I don't think Scheme is much easier to learn. C is at least easier to
understand for someone who has an understanding how a CPU works and
how data is arranged in a computer (which was the case for me).

I don't want to start a language flame war, also. After all, this is a
description of a past state of mine and you're not going to change
history, no matter how wrong I was :-)

Happy Lisping
	Martin
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin_Cracauer@wavehh.hanse.de http://cracauer.cons.org  Fax.: +4940 5228536
"As far as I'm concerned,  if something is so complicated that you can't ex-
 plain it in 10 seconds, then it's probably not worth knowing anyway"- Calvin
