[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Basic Design Questions
- To: email@example.com
- Subject: Basic Design Questions
- From: firstname.lastname@example.org (Stanley Shebs)
- Date: Mon, 17 Feb 86 09:13:14 MST
About a month ago, I had some discussions with Julian Padget concerning
EuLisp vs Common Lisp. One suggestion I found interesting was that the
very lowest level of Eulisp, while lexically scoped, would not necessarily
have lexical closures. In fact, it might be the moral equivalent of
Pascal (yech), in terms of functionality, and in terms of how much
reinvention of the wheel would be necessary to use the subset for real
programs. This doesn't bother me a lot, since people wouldn't use this
subset except for very special purposes (education, and maybe as
machine-independent object code).
The real reason for this posting has to do with the issue of single value
cell vs value cell/function cell. Now I don't want to start a session
with flamethrowers - here are some specific questions:
1. I've always assumed that the double cell arrangement in Common Lisp
was for backwards compatibility. Is this true? Are there any other
strong reasons for retaining the duality? Does anyone believe that
efficiency is an issue?
2. (for diehard Schemers only) The strongest reason I've heard for the
single cell arrangement is simplicity. Semantic "purity" or "rationality"
is frequently claimed, but that's incredibly subjective, so it seems less
strong to me. Are there any other reasons?
3. How hard is it really to embed a double cell Lisp in a single cell one,
taking into account compiler effects, changes to existing user programs,
and so forth? Can it be done without destroying performance?
4. How hard is it to embed a single cell Lisp in a double cell one?
One of the problems with doing this is handling user programs that try
to do things like mentioning "#'" and using a variable called "function"
in the same lexical scope. Are there good ways of handling this without
transforming the program? How about efficiency?
My superficial analysis is that implementing double cell Lisp in single cell
Lisp is easier than the reverse, since one can use the ancient expedient
of the property list, and do tricky things in the compiler. Implementing
single cell behavior in a double cell Lisp seems harder, without completely
replacing the interpreter. I have no idea about relative efficiencies of
these schemes (no pun intended!).