Newsgroups: comp.lang.lisp,uk.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news.harvard.edu!news2.near.net!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!swrinde!pipex!festival!edcogsci!jeff
From: jeff@aiai.ed.ac.uk (Jeff Dalton)
Subject: Re: C vs LisP yet again (long but thoughtful)
Message-ID: <CwJAv6.LoF@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: <CwI0Ly.3Av@rheged.dircon.co.uk>
Date: Thu, 22 Sep 1994 13:59:29 GMT
Lines: 104

In article <CwI0Ly.3Av@rheged.dircon.co.uk> simon@rheged.dircon.co.uk
(Simon Brooke) writes:

[I pretty much agree with much of this.  However...]

>Finally, in the context of a machine with an operating system
>optimised for the sort of programs the C compiler produces, a trivial
>program, written in C, loads and executes quickly. The same program
>written in a high level language will require to load the whole
>operating environment for that language before it can run. 

While this is usually so in practice -- with current implementations --
it's far from necessary.

>By contrast, on a LisP machine (such as a Xerox D series, a Texas
>Instruments Explorer, a Symbolics, or a LisP Machine) the program
>written in LisP would load and execute quickly, and the C version
>would be a pest.

I'm not sure about that.  I'd expect C programs to work pretty
much like Lisp programs.

Lisp could be implemented more like C on "conventional" machines.
There'd be a library (or libraries) that would have to be linked in,
but the result wouldn't have to be huge.  However, most Lisps aren't
implemented that way.  It's this implementation choice that results
in the whole env being loaded.  [There are other ways to deal with
the size and slow startup problems, but this is one.]

On a Lisp machine, I'd expect C to be implemented in a way that
fit fairly well with Lisp.  So there wouldn't be a huge Lisp / C
difference.

>Oh yes, that's another serious point. For ***'* sake don't start
>anyone LisPing with the aluminium book abortion. Start them on a small
>elegant LisP like Scheme or XLisp or even good old PSL. As Arthur
>Norman put it, 'aluminium books rot brains'. It (CL and CLTL both)
>must have put more people off the language than any other factor.

I find this interesting.  I find Common Lisp  reasonably tolerable,
but I'm put off by many things in PSL.

Some people *are* strongly put off by the "Aluminum Book", but I've
found it difficult to figure out just what the problem is.  When I 
can get some details, it often turns out that different people are
bothered by different things, and it often turns out that their views
are based on a misunderstanding.  Sometimes they misunderstand Common
Lisp; in other cases, they're mistaken about Lisp history or about
other Lisps.

(For example, it's been claimed that Common Lisp's scoping rules
are a "union" of rules from various other Lisps, that CL is trying
to include everything, in some sense.  But in fact, it's more
accurate to see CL's rules are a cleanup and generalization
of MacLisp's.)

>Conclusion
>
>Most people who are seriously interested in software study computing
>at college or university where they typically learn an AlgoL family
>language (C or Pascal) first. They find this language adequate for
>most of the tutorial problems they tackle, and when they attempt a
>radically different language they find the skills they've learned
>don't transfer.
>
>By the time they become really skilled, they can tackle more or less
>any computing problem in their language of choice, so don't need to
>transfer. 

I took some courses in which we could pick our langauge for some
things.  So I'd use Lisp.  I often found that other people were still
working out a way to represent something, and writing all the support
routines, when I was finished with the whole program.  Apart from
language choice, they were about as good a programmer as I was.

So while they could tackle more or less anything in the language
of their choice, there was still a price to be paid.

>However, I'm one of the people who have chosen to transfer.  My
>language of choice is LisP. This is because I value my time:
>programmers are expensive, silicon is cheap. Or, to put it another
>way, people are more important than things.
>
>I'd be interested to know how many students from those colleges which
>as a matter or practice teach a LisP variant *first*, later *choose*
>to switch to an AlGol family imperative language. Has anyone done any
>relevent research?

Well, for what it's worth, I learned Basic first, and used it.
I then ran into the Algol 60 report and looked at some other
languages, including Algol 68.  I didn't write programs in any
of them (not until later, at least).  I also encountered some
Lisp documentation and later the Lisp 1.5 book.  Lisp was weird,
but I found it fascinating.  It (maybe with some Algol influence)
changed my programming style in Basic, since I started writing 
programs that were largely collections of procedures (all called
"fn<letter>"!) and using recursion (which RSTS Basic happened
to support).  Since no Lisp implementation was available, I wrote one
by translating the eval/apply definition of the Lisp 1.5 book into
Basic.  It took me a while to figure out lists; my first version
used strings.  I didn't write a garbage collector, but it was still
enough for small programs.

-- jeff
