POS, OOFS, CL v Scheme, etc.

Henry G. Baker hbaker@netcom.com
Tue, 13 May 1997 14:03:35 -0700 (PDT)

> I introduced the concept of global variables for Common Lisp.
> (defglobal *foo* 10)  declared *foo* so the compiler did not do
> dynamic binding lookup for the variable.  This was very important
> to achieve high performance.

Interlisp had this concept.  Ugghhh...

> Unfortunately, Common Lisp defines a bunch of dynamic variables
> which mucks everything up.  *print-length*, *print-level*, etc, etc.
> They should be killed dead and replaced with something else,
> like only a single variable *printer-control*, which is bound
> to a CLOS instance that holds the values for these fields,
> or something like that.

I agree with this sentiment.  However, there are things for which
'dynamic' binding is best -- i.e., (with-new-transaction ...).

CL _could_ have reduced these to a dull roar by packaging up all of
the print control vars into one structure, and then dynamically
binding that whole structure.

There is a very good question about how to dynamically affect the
'defaults' of some complex operation.  Dynamic variables are one way,
but the other ways all have there problems, as well.  E.g., having to
pass 23 parameters to each function a la large Fortran systems, most
of which are always the same.

Henry Baker
www/ftp directory URL: