Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!zephyr.ens.tek.com!tektronix!percy!data!kend From: kend@data.UUCP (Ken Dickey) Newsgroups: comp.lang.misc Subject: Re^4: Closures (was Re: class-sic.) Message-ID: <446@data.UUCP> Date: 23 Jan 91 16:51:57 GMT References: <20058@yunexus.YorkU.CA> <27942:Jan902:20:0791@kramden.acf.nyu.edu> <27770.278aef90@kuhub.cc.ukans.edu> <22345:Jan1021:30:4591@ Organization: Microcosm, Beaverton, OR Lines: 44 kers@hplb.hpl.hp.com (Chris Dollin) writes: >Ken Dickey writes: > ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes: > >The only surviving language I know of that implements a proper > >closure facility is POP-11. Some LISP hackers seem to think they've got > >closures too, but they haven't--all they've got is an almost-as-useful > >kludge that requires call frames to be allocated on the heap. > Try Scheme and Common Lisp. There are some very good compilers in > both camps which typically use stack frames and allocate only on the > heap where needed. Note that closures which may be captured (e.g. in > global variables) are required to be heap allocated--or you don't have > the power of full closures. >Ken (and others) seem to have fallen into the accidental terminological trap >that Lawrence has set. In Pop, the term "closure" has traditionally meant a >procedure created by partially applying some given to procedure to some >collection of arguments. I must clain ignorance of Pop, but in common usage [e.g. see (1), (2), (3)], a closure is called such because it captures free variables by "closing over" the environment at time of creation. This differs from currying [see (1), (3)] which seems to be what you mean by "closure". Again, my viewpoint comes from literature in lambda calculus and denotational semantics. Are there references in the general literature which support your definition? -Ken Dickey kend@data.uucp --------------------------------------------------------- (1) Stoy: "Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory", MIT Press, 1977. (2) Schmidt: "Denotational Semantics" A Methodology for Language Design", Allyn and Bacon, 1986. (3) Barendregt: "The Lambda Calculus, its Syntax and Semantics", North-Holland, 1981.