Path: utzoo!utgpu!water!watmath!clyde!rutgers!cmcl2!nrl-cmf!ames!pasteur!ucbvax!hplabs!otter!kers From: kers@otter.HP.COM (Christopher Dollin) Newsgroups: comp.lang.lisp Subject: Re: Composition/Partapply in CL Question Message-ID: <1350004@otter.HP.COM> Date: 13 Jan 88 16:03:10 GMT References: <1350002@otter.HP.COM> Organization: Hewlett-Packard Laboratories,Bristol,UK. Lines: 21 One problem with using lexical variables freely (as in compose in the basenote) is that although it may cons only a few words, the resulting closure may contain pointers to unused but arbitrarily large structures, thus permitting garbage to be retained way part its normal collection. I'm afraid I don't know enough about Lisp implementation to know if this is likely to be a problem: how is the environment usually represented? [In the case of Pop11, lexical closures are implemented as concealed partial applications, like lambda-lifting; hence no extra garbage is retained, but the closure is more expensive to compute. It conses store by something like fixed overhead + 2 * number of free variables where the fixed overhead is that for a simple procedure plus call to the part-applyed procedure, and each free variable contributes some store for the indirection headers and some for the instruction to push it as an argument. If I have messed up the description I apologise in advance to John Gibson and the rest of the Poplog team!] Regards, Kers. | "Why Lisp if you can talk Poperly?"