[net.lang.lisp] {early-,late-}{deep-,shallow-}binding

mac@uvacs.UUCP (12/02/83)

The way I understand it, there are two issues in Lisp binding: time and
place.

Time:
The two times to bind are early and late, also known as static and dynamic,
or lexical and ??.
+  Early binding is done when a function is defined.  Free variables
   refer to those in effect where the function definition appears.
+  Late binding is done when the function is called.  Free variables
   refer to those on the dynamic call stack.

Place:
The two places to bind are deep and shallow.
+  Deep binding uses something like an A-list, with a list of all active
   variable bindings.  Free variable lookup may have to search deep down
   the list.
+  Shallow binding uses a value stack for each variable.  Lookup is
   quick.

The two issues are independent.  For example, it's traditional in Lisp
to use late binding.  Lisp 1.5 used deep binding, Franz uses shallow.
Scheme and related dialects (T) use early binding.  Scheme uses deep
binding.  I don't know any dialect that uses early shallow binding.  It
sounds difficult.

There does seem to be confusion on this score.  I was going to complain
about the incorrect use of deep to mean static in "Principles of
Compiler Construction", Aho & Ullman, but I discovered that the 1979
edition corrected this.

Alex Colvin

 ARPA: mac.uvacs@csnet-relay CS: mac@virginia USE: ...uvacs!mac