Benevolent Dictatorship

Kragen kragen@pobox.com
Thu, 19 Mar 1998 23:48:39 -0500 (EST)


On Fri, 20 Mar 1998, Chris Bitmead wrote:
> Kragen wrote:
> 
> > I suspect that this choice is inconsequential.  I think it'll be fairly
> > easy to support either Common Lisp or Scheme in the same OS framework.
> 
> I don't think it will be easy at all. A LispOS means an OS that
> is totally integrated with the language. 

I don't think that's necessarily the case.

To me, a LispOS means an OS that is well-suited to running Lisp
programs, and in which the benefits of Lisp are shared by all the
objects in the system.

Common Lisp and Scheme use essentially the same set of basic
operations, it seems to me (from my limited acquaintance with them,
having read R4RS and most of the Elisp manual, and written a few toy
programs in each language.)  The primary differences in the underlying VM are:

1) Can an atom have both a meaningful data value and a useful functional value?
(Yes in CL, no in Scheme)
2) How are function arguments scoped?  (Dynamically in CL, statically in Scheme)
3) Is general tail-call elimination required?  (No in CL, yes in Scheme)

There are probably numerous other differences like these, but I suspect that
they can be papered over with different definitions.

For example, (1) can be dealt with by having the underlying VM manage
two obarrays for a CL environment, but only one for a Scheme
environment.  If manipulation of obarrays is possible from the language
level, this shouldn't be too hard.  

Kragen