Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news.harvard.edu!news2.near.net!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!EU.net!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: <Cwsvrs.Dtv@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> <CwJ82u.7nL@csfb1.fir.fbc.com>
Date: Tue, 27 Sep 1994 18:09:28 GMT
Lines: 62

In article <CwJ82u.7nL@csfb1.fir.fbc.com> mfischbe@panix.com (Mike Fischbein) writes:
>
>:   There are more
>: abstractions involved.  Thus, C is more easily comprehended by
>: inexperienced programmers.
>
>Which renders this conclusion invalid.  There are not more abstractions
>involved; but the abstractions involved in Lisp are *different* than
>those involved in C, and *different* than those most novice programmers
>have been involved with.
>
>C's conceptual machine model is similar to that of the most common
>beginner/teaching languages, BASIC and Pascal, without many of the
>limitations of those languages. 

I'd be interested in hearing what people think this conceptual
machine model is.  I suspect that Lisp could be explained in 
terms of that model or one fairly similar to it.

I also wonder how people learning C understand certain things.
For instance, if a variable has type int, there are a couple
of ways to think of this:

  * It ensures that you can assign only ints to it.

  * It says how to interpret the bits at the address that corresponds
    to the variable (including how many of them are part of the var's
    value).

BTW, there's a clash between Basic and C when it comes to strings.
Strings are much easier to deal with in a good Basic (to my mind, at
least), but the required machine-level model is fairly complex.
I don't think lists have to be harder to understand than that,
and I suspect they're easier.

>       C's conceptual machine model is also
>similar to most common CPUs.  This makes it easier for novice
>programmers, who've been working in BASIC and studying the 8086
>instruction set, to map their conceptualizations to C than to Lisp.
>Similar handwaving for Pascal and 68000.

Do novice programmers normally study the hardware instruction set?
That sounds like a rather hacker-like set of novices to me!

>A programmer who can work comfortably with C, BASIC, Pascal, Fortran,
>et al, has really learned one conceptual machine with different (and
>varying amounts of) syntactic sugar.  This makes it easy to shift from
>one Algol-like language to another; having learned BASIC or Pascal, the
>novice programmer finds C to be an extension of already known
>concepts.

Or a restriction (e.g. compared to Basic strings).

But I agree with the general point.

>  Lisp presents a different way of thinking about the problem
>that does not fit comfortably with what the novice already "knows"
>about programming.

But why is that?  I'm not sure it's true.

-- jeff
