Re: The compilation approach in modern languages

George Neuner <gneuner2@comcast.net>
1 Mar 2005 15:52:42 -0500

          From comp.compilers

Related articles
[13 earlier articles]
Re: The compilation approach in modern languages dot@dotat.at (Tony Finch) (2005-02-18)
Re: The compilation approach in modern languages hannah@schlund.de (2005-02-18)
Re: The compilation approach in modern languages boldyrev@cgitftp.uiggm.nsc.ru (Ivan Boldyrev) (2005-02-18)
Re: The compilation approach in modern languages jle@ural.owlnet.rice.edu (2005-02-20)
Re: The compilation approach in modern languages gneuner2@comcast.net (George Neuner) (2005-02-28)
Re: The compilation approach in modern languages anton@mips.complang.tuwien.ac.at (2005-02-28)
Re: The compilation approach in modern languages gneuner2@comcast.net (George Neuner) (2005-03-01)
Re: The compilation approach in modern languages boldyrev@cgitftp.uiggm.nsc.ru (Ivan Boldyrev) (2005-03-04)
Re: The compilation approach in modern languages anton@mips.complang.tuwien.ac.at (2005-03-05)
Re: The compilation approach in modern languages hannah@schlund.de (2005-05-18)
| List of all articles for this month |
From: George Neuner <gneuner2@comcast.net>
Newsgroups: comp.compilers
Date: 1 Mar 2005 15:52:42 -0500
Organization: Compilers Central
References: 05-02-053 05-02-056 05-02-065 05-02-075 05-02-082 05-02-101
Keywords: design, Lisp
Posted-Date: 01 Mar 2005 15:52:42 EST

On 28 Feb 2005 00:53:47 -0500, anton@mips.complang.tuwien.ac.at (Anton
Ertl) wrote:


>Ivan Boldyrev <boldyrev@cgitftp.uiggm.nsc.ru> writes:
>>> [Well, sure. Lots of languages can compile at runtime. -John]
>...
>>Perhaps, (Common) Lisp/Scheme is different from them because
>>COMPILE-FILE is *standard* function.
>
>Hmm, COMPILE-FILE is not quite what I consider compilation at
>run-time. Even in C I can do system("cc ..."); ok, some people have
>used that in combination with dlopen/dlsym to achieve a kind of
>run-time compilation, but it is relatively cumbersome.


Lisp has the standard function COMPILE for run-time compilation. It
also has COERCE which (among other uses) can create an interpreted
function at run-time from a suitably structured list.


When called directly on a suitable list, COMPILE calls COERCE to
create a function and then compiles and links the function.


COMPILE-FILE is merely a driver function for COMPILE which takes its
input from a stream.


>What I am thinking of when I hear Lisp and run-time compilation are
>things like macros and back-quote.


Most macro use in Lisp occurs at development time. The typical run
time use is to hot patch a running program and is hidden behind a LOAD
of the new code. A program whose normal operation requires a lot of
run time macro expansion is either doing something incredibly smart or
insanely stupid.


George


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.