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: <Cx5vqF.5E3@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: <36g8e6$2f4@relay.tor.hookup.net> <19940930T085535Z.erik@naggum.no> <36p4rb$6gd@relay.tor.hookup.net>
Date: Tue, 4 Oct 1994 18:37:27 GMT
Lines: 62

In article <36p4rb$6gd@relay.tor.hookup.net> hutch@RedRock.com (Bob Hutchison) writes:
>   I don't
>suggest that a novice has any kind of accurate model of hardware, but I do
>think they have a notion of a simple machine that corresponds very well
>to the techniques supported by C.

Can you say more about what this model is?  I can think of a number
of possibilities and can't tell which sort you have in mind.

>>one could even argue that the C model is employed at the hardware level,
>>and thus makes hardware understandable in terms of software concepts.
>
>I think that this is part of what I was trying to get at.  C allows the 
>programmer to easily predict the behaviour of a program because of this
>similarity.

Presumably you have tried to predict the behavior of C programs
and found that it can be difficult.  That is, you've written C
programs that didn't behave as you expected and had to be debugged.
Presumably you don't think it's easy to predict the behavior of
C programs in general.

But how about simple programs?  And why should it be any worse for
Lisp?  I don't see why + in Lisp has to be any trickier than in C.
(Maybe the Common Lisp version is trickier, but Lisp doesn't have to
be Common Lisp.)  In some ways, Lisp will make things easier: you can
treat it as an interactive calculator.

Or consider this simple program:

void hello_world()
{
    fprintf(stdout, "hello, world\n");
}

And now the same thing in Common Lisp:

(defun hello-world ()
  (format *standard-output* "hello, world~%"))

They're not very different.

Surely there's a wide range of Lisp programs whose behavior is
as easy to predict as that of similar C programs.

>>for me, programming in MACRO-10 on the DEC 10 some 10 years ago provided an
>>interesting insight into some of the things in Common LISP today.  such as
>>the constants used in the `boole' function.  small things, but so familiar
>>that they made me laugh with recognition.  LISP is hardware, too!
>
>Sure, but lisp addresses a lot more than what C addresses.

There are some very simple Lisps, simpler even than Scheme.
You can do a fair amount in Lisp that would require knowing
about arrays, structs, and declarations in C.

>I think that hardware is designed to support already common environments,
>like UNIX and DOS/Windows.  

Really?  Is that what hardware designers say?

-- jd
