From: Jeff Dalton
Subject: Re: C vs LisP yet again (long but thoughtful)
Date: 
Message-ID: <CwJAv6.LoF@cogsci.ed.ac.uk>
In article <··········@rheged.dircon.co.uk> ·····@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

From: William D. Gooch
Subject: Re: C vs LisP yet again (long but thoughtful)
Date: 
Message-ID: <Pine.A32.3.90.940922110223.28363N-100000@swim5.eng.sematech.org>
On Thu, 22 Sep 1994, Jeff Dalton wrote:

> In article <··········@rheged.dircon.co.uk> ·····@rheged.dircon.co.uk
> (Simon Brooke) writes:
> ....
> >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.

Yep.  Which is to say "better than they do in Unix."  When I ported my 
thesis programs (written in Pascal) to Genera, it took very little time 
to get them working, and I almost immediately found and fixed two bugs 
that had not been apparent under DEC10 or Vax Pascal.  This happened 
because of the superior development environment.  Subsequently, I added 
(with only moderate effort) hooks to Lisp code to do algorithm 
visualization on the 3D shape processing.  Very worthwhile, and very 
much harder to do in another environment.

The only real complaint I heard about Symbolics' C (beside the fact that 
they quickly dropped commercial support for it) was that it was ANSI-C 
compliant, at a time when most implementations weren't, and that this 
made it incompatible with existing C programs.  Oh yes, and I think they 
may have initially left out support for some of the libraries people 
depended on a lot (I don't remember details of this, but obviously it 
was fixible).
From: William D. Gooch
Subject: Re: C vs LisP yet again (long but thoughtful)
Date: 
Message-ID: <Pine.A32.3.90.940922170101.28363Y-100000@swim5.eng.sematech.org>
On Thu, 22 Sep 1994, William D. Gooch wrote:

> On Thu, 22 Sep 1994, Jeff Dalton wrote:
> 
> > I'm not sure about that.  I'd expect C programs to work pretty
> > much like Lisp programs.
> 
> Yep.  Which is to say "better than they do in Unix."....

Oops, it was not clear when I said this that I meant behavior, not 
performance.  Performance of Pascal or C in Genera is not that good, 
especially compared with that of Lisp.  It's not terribly bad either
(not so slow as to be "pest"like), but I wouldn't buy a LispM in     
order to run programs written in other languages quickly.