[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Mar 6 19:12:12 1995 
Subject:Re: Is there a name for..... 
From:Chris Dollin 
Volume-ID:950315.01 

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)