Newsgroups: alt.lang.design,comp.lang.c++,comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!hookup!swrinde!pipex!dircon!rheged!simon
From: simon@rheged.dircon.co.uk (Simon Brooke)
Subject: Re: Interpreters (Re: Comparing productivity: LisP against C++ (was Re: Reference Counting))
Message-ID: <D3J8FB.11v@rheged.dircon.co.uk>
Organization: none. Disorganization: total.
References: <RFB.95Jan20150836@cfdevx1.lehman.com> <D2x55L.8Ht@cogsci.ed.ac.uk> <3gftki$26f@karlo.informatik.uni-kiel.de> <D36LA9.y4@cogsci.ed.ac.uk>
Date: Sun, 5 Feb 1995 15:01:58 GMT
Lines: 42
Xref: glinda.oz.cs.cmu.edu comp.lang.c++:111320 comp.lang.lisp:16717

In article <D36LA9.y4@cogsci.ed.ac.uk>, Jeff Dalton <jeff@aiai.ed.ac.uk> wrote:
>
>*Lisp* does not have to include eval.  Neither EuLisp not Scheme
>have an eval, for instance.  (Eval is not part of those language
>definitions.)  But even in Lisps that do include eval (such as
>Common Lisp), it's not necessary to have an interpreter.  Everything
>can be done by a compiler.  My point above was that *languages* in
>the Lisp family do not have to be interpreted, even though it's
>common for *implementations* to be or to include interpreters.

Jeff, you've laboured this point, and in labouring it have convinced
me that you are wrong (normally, I tend to believe what you say :-}).

Common LISP, as a standard language, does have and does have to have
an interpreter. How individual implementations implement that
interpreter is up to the authors; if they choose to implement the
interpreter by making a call to the compiler and then executing the
result, that's up to them, but it doesn't make the process any the
less one of interpreting language.

And, indeed, as your correspondent has pointed out, one feature that
all LisP variants share is that it is trivial to build, in LisP, an
interpreter for S expressions (it's not trivial to build one with
exactly the same semantics as the compiler, but that's a different
argument). So if eval isn't there, you can quickly build enough of it
to suit most purposes.

If you perversely hacked enough out of LisP (any LisP) to make it
*hard* to write an interpreter for S expressions, it would be pretty
much useless for any other purpose, too.

By contrast, although it's fairly easy to write interpreters for
simple languages in AlgoL family languages, it isn't easy, for example
to write in C an interpreter for C source code.

-- 
------- simon@rheged.dircon.co.uk (Simon Brooke)
    .::;===r==\   
   /  /___||___\____         
  //==\-  ||-  |  /__\(      MS Windows IS an operating environment.
 //____\__||___|_//  \|:     C++ IS an object oriented programming language. 
   \__/ ~~~~~~~~~ \__/       Citroen 2cv6 IS a four door family saloon.
