Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 (Tek) 9/26/83; site tekecs.UUCP Path: utzoo!linus!decvax!tektronix!tekgds!tekecs!patcl From: patcl@tekecs.UUCP (Pat Clancy) Newsgroups: net.lang.lisp Subject: Re: shallow binding and deep binding Message-ID: <3272@tekecs.UUCP> Date: Tue, 29-Nov-83 14:25:24 EST Article-I.D.: tekecs.3272 Posted: Tue Nov 29 14:25:24 1983 Date-Received: Thu, 1-Dec-83 04:33:45 EST Organization: Tektronix, Wilsonville OR. Lines: 41 The definitions of the terms "shallowing binding" and "deep binding" which I learned are different from those given by umcp-cs!liz. Namely: deep binding requires a tree of saved environments, while shallow only requires a stack. The difference has to do with the binding of free variables, eg: (csetq foo(lambda(x) (lambda()(car x)) )) (csetq bar(lambda(x y) ((foo y)) )) (please excuse the probably weird usage, I learned Lisp on a Univac 1100!) Now the result of: (bar '(a b) '(c d)) has two possible values: deep binding: c shallow binding: a The free variable is the "x" inside the function returned by "foo". With deep binding, the alist branch created when foo is being evaluated is saved, including the entry for x, and this is the x which is found on evaluation of the inner (unnamed) function (ie, the inner function is passed a "funarg" including a pointer to the saved environment). With shallow binding, the x created during foo's evaluation is lost when foo exits (no alist tree, only a stack), so the x created during evaluation of bar is found. I have seen both this, and umcp-cs!liz's definitions in the literature, so I believe they are both correct but incompatible usages of these terms. Pat Clancy Tektronix