Subject: Re: Structure of a lisp system. Contd...1
From: (Rob Warnock)
Date: Tue, 21 Aug 2007 05:31:02 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
Sacha  <none@address.spam> wrote:
| CLisp (own byte code) and Armed bear CL (java byte code) are the two CLs 
| compiling to byte code, they indeed have a VM. Other implementations 
| are compiling to native (lispworks, allegro, sbcl, cmucl). These last 4 
| allow for creating standalone executables, I'm not sure about the first 2.

Slight correction: CMUCL can *also* compile to byte codes as well as
machine code, and single programs can contain mixtures of functions
that are interpreted (not compiled[1]), byte-compiled, or fully compiled
to machine code. There is automatic conversion of the calling sequences
as necessary.


[1] Or rather, only minimally compiled, in the sense of CLHS "Minimal Compilation". That is, even in CMUCL
    interpreted code, macros are only expanded once, the first
    time the interpreted function is called. [CMUCL internally
    calls this process "conversion".]  For example:

       cmu> (defmacro foo (x)
	      (format *debug-io* "; FOO expanded~%")
	      `(+ ,x 3))

       cmu> (defun bar (y)
	      (+ 5 (foo y)))

       cmu> (bar 10)
       ; FOO expanded

       cmu> (bar 15)


Note that no "FOO expanded" message was printed on the
second call to BAR.

Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607