Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!decwrl!shelby!neon!michaelg From: michaelg@Neon.Stanford.EDU (Michael Greenwald) Newsgroups: comp.lang.lisp Subject: Re: flet, a question of style? Message-ID: <1990Aug13.201712.19721@Neon.Stanford.EDU> Date: 13 Aug 90 20:17:12 GMT References: <1990Aug4.001913.22597@Neon.Stanford.EDU> Organization: Computer Science Department, Stanford University Lines: 26 lou@atanasoff.rutgers.edu (Lou Steinberg) writes: >The other way this poorer-support of local definitions shows up is in >the incremental-load-compile facility that many lisps (or lisp/emacs >combinations) support. It is useful to be able to modify one >function, then load (and maybe compile) the modified definition >without reloading/recompiling the whole program. I don't know of any >lisp that allows you to do this with a local definition. Symbolics Common Lisp allows you to do this indirectly. You can ADVISE a local function ('(:INTERNAL FOO 0) is the function spec for the first function defined by FLET, LABELS, or LAMBDA inside FOO. You can use (:INTERNAL FOO 0 localname) if the function has a local name). If you compile the :AROUND advice, and never actually call the original code, you've essentially replaced the original local definition. Of course, you don't get access to lexically apparent variables, so ADVISE is probably not what you meant, If you >do< want to access the local variables of the parent, then it would be hard to see how to easily implement the local compilation without explicitly passing in the parents environment. I guess my real question is: how often would you >want< to modify and compile an internal definition without its parent? The cost of modifying the parent, also, can't be that large unless something is >really< strange about your program.