Shallow Binding

A method for implementing DynamicScoping in LispLanguage where the value of each variable is stored in the symbol itself (the location is often called the symbol-value or "value cell"). When a variable is rebound, the current value is pushed onto the runtime stack. When a binding exits scope, the old value is popped off of the runtime stack. ShallowBinding is used in MacLisp and EmacsLisp. It is also used by LispOnePointFive for "special" variables in compiled code.

ShallowBinding gives good performance when looking up variables, but makes the implementation of DynamicClosures difficult. MacLisp, for example, only solved the "downward funarg" problem, and not the "upward funarg" problem.


See also: DeepBinding DynamicClosure LispLanguage MacLisp EmacsLisp


CategoryLisp CategoryHistory


EditText of this page (last edited July 16, 2005) or FindPage with title or text search