Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news.harvard.edu!news2.near.net!MathWorks.Com!news.duke.edu!convex!cs.utexas.edu!swrinde!pipex!lyra.csx.cam.ac.uk!warwick!uknet!festival!edcogsci!jeff
From: jeff@aiai.ed.ac.uk (Jeff Dalton)
Subject: Re: Why do people like C? (Was: Comparison: Beta - Lisp)
Message-ID: <CwJ88z.K2E@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: <os2Psc1w165w@sytex.com> <35dcf9$jao@news.aero.org> <35kbl8$8ni@relay.tor.hookup.net>
Date: Thu, 22 Sep 1994 13:02:59 GMT
Lines: 77

In article <35kbl8$8ni@relay.tor.hookup.net> hutch@RedRock.com (Bob Hutchison) writes:
>>              My latest theory is that the answer lies in cognitive
>>effects arising from the conception and structure of the language.
>>People make up mental models of how things work, and interpret the
>>programs they write in terms of those models.  [...]  The
>>intellectual effort required to develop a good model for Lisp or Ada is
>>much greater than that required to develop one for C.  There are more
>>abstractions involved.  Thus, C is more easily comprehended by
>>inexperienced programmers.
>
>Interesting theory here, but I don't think I agree.  In my experience, novice
>programmers are so caught up in the details that they cannot make
>useful abstractions at all.  This is the kind of thing you would expect
>of anyone learning something (e.g. many sports, especially team sports).
>I think that you are right that C is easier for them to comprehend, but
>I don't think it is because it has easier abstractions.  I think it is because
>they can use the computer hardware itself as C's abstraction, that is,
>use a concrete thing as an abstraction -- what an illusion :-)  I guess
>that I think you are basically right that the novice has a difficult time
>forming a useful understanding of how the language works, but I think
>this is difficult for any language.  I think that in C's case the novice can
>cheat.

I thought your (Bob Hutchison's) article excellent, and I don't want
to give the opposite impression by disagreeing with part of it.  Also,
I like the idea of using a concrete thing as an abstraction, though I
suspect that many people have a somewhat abstract model of the hardware.

However:

  (a) Novices don't necessarily know all that much about the hardware;
  (b) Novices (e.g. children even back in the days before they grew up
      with video games) have found it fairly easy to learn languages
      that aren't so close to the hardware (e.g. LOGO, Basic).
  (c) There are reasonably simple hardware-based models that work
      for Lisp.

This makes me question whether C wins because novices can use
the hardware as a "cheat".

It's important to bear in mind that some Lisps -- e.g. Common Lisp,
InterLisp -- are large and full of rather complicated stuff while
other Lisps are very simple.  They're smaller and simpler than C; and
Lisp implementations tend to be interactive, which makes it easier to
try things out.  It's also easy to set up Lisp to use the "just run
it" Basic approach.

Nonetheless, I think that in practice Lisp *is* often hard to learn.
I'm not sure I can say whether it's easier or harder than C.  It
would depend, for one thing, on how much of C and how well it must
be understood, and on how much of which Lisp.

Anyway, in my view the following factors are responsible for much
of the difficulty:

  (1) The fully parenthesized prefix syntax.
  (2) Peculiar, unfamiliar names such as car, cdr, cond, and lambda.
  (3) Hard topics such as recursion that tend to be mixed in with
      learning Lisp.
  (4) Confusing presentations of eval, quote, and "evaluates its
      arguments" that make the question of what gets evaluated
      seem much harder than it is.  (The syntax also contributes
      to this, because it's so uniform.)
  (5) Teaching that has a mathematical flavour and emphasises the
      functional side of Lisp.  This is great for some students but 
      makes Lisp much harder for others.  E.g. box-and-arrow diagrams
      are tied to the discussion of mutation, and hence aren't
      available when people are first trying to figure out what lists
      are.  (A number of odd models can result from this.)

Some of these are already questions of how Lisp is taught.  Others,
such as the fully parenthesized syntax, require more care in
presentation than they often receive.  It will also be interesting
to see how much difference it makes to change the syntax (as in
Dylan).

-- jeff
