Newsgroups: comp.lang.pop
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!news.sprintlink.net!hookup!news.kei.com!simtel!col.hp.com!news.dtc.hp.com!hplextra!hplb!cdollin!kers
From: kers@hplb.hpl.hp.com (Chris Dollin)
Subject: Re: Is there a name for.....
Sender: news@hplb.hpl.hp.com (Usenet News Administrator)
Message-ID: <KERS.95Mar6121212@cdollin.hpl.hp.com>
In-Reply-To: richardm@cogs.susx.ac.uk's message of 3 Mar 1995 17:33:31 GMT
Date: Mon, 6 Mar 1995 19:12:12 GMT
References: <3j5afc$sp2@infa.central.susx.ac.uk> <3j6ukt$cc0@infa.central.susx.ac.uk>
	<3j7jtb$ij7@infa.central.susx.ac.uk>
Nntp-Posting-Host: cdollin.hpl.hp.com
Organization: Hewlett-Packard Laboratories, Bristol, UK.
Lines: 51

richardm@cogs.susx.ac.uk (Richard Matthias) writes:

   Don't you just love the Usenet? I feared there wasn't a simple answer to my
   question. Now I get to have a public argument with members of the faculty!

   Adrian Howard (adrianh@cogs.susx.ac.uk) wrote:
   : Both Poplog Pop-11 (and most MLs that I am aware of) compile to native 
   : machine code --- they are *not* interpreted. This seems to be a common 
   : misconception.
   : There are also versions of C and Pascal that are interpreted! Unix shell
   : scripts and Perl (usually used for "systems" programming) are interpreted.

   Yes, I am aware of the difference between interpreted and compiled languages.
   I am aware that Poplog pop11 is compiled, but how much code does the compiler
   generate for say an = operator? Does it insert all the code do the key
   checking of the operands to make sure they are numeric, do the necessary type
   conversions etc. or does it just call a common library for these functions? I
   fear it does the latter. If the compiler just generates multiple calls to a
   massive library of code that must be present to run the program, then it 
   might as well be interpreted!

You could make the same argument about most programs; they'll spend their
time calling libraries of code which happen to be written for the particular
application.

Expanding ``='' in-line would be a jolly good way to make your code go
gobs slower. 

   : Runtime environments? Unfortunately these are also rather difficult 
   : to define.
   : Let's just look at the issue you raised --- heap management. What is the
   : difference between Pop-11 using a garbage collector and C using malloc 
   : et al?
   : Not a lot really [1]. Both are necessary for any useful program in either
   : language. Both are used at runtime.

   Malloc doesn't manage the heap though. 

It certainly *does* manage the heap.

   All it does is allocate memory. 

``All''? That's a non-trivial thing to do. Remember it has to cope with
the demands of ``free'' and ``realloc'', and the programmers desire not
to run out of stoire just because they've allocated and then freed 1000
10Mb arrays on their 16Mb machine.

--

Regards,    | "If taking devious pains was a sign of laziness, he was quite
Kers.       | prepared to call Hazelton the laziest man alive." Blish (m-o-l)
