Subject: Re: When to recompile/reeval? From: Erik Naggum <firstname.lastname@example.org> Date: 12 Oct 2002 19:22:44 +0000 Newsgroups: comp.lang.lisp Message-ID: <email@example.com> * firstname.lastname@example.org (Thomas A. Russ) | Changing the definition of CLOS classes will also work on the fly | without requiring changes to the using code -- even if you add or delete | slots from the class. (Unless of course the code happens to use slots | you decide to delete...) It may help to understand how slot access works in CLOS compared to inferior object models. If you try to access a slot with `slot-value´, and it has been deleted, the system invokes an error handler that may still return a useful value. If you read a slot with an accessor generic function, that function can still exist and do useful things, and it might just be able to know enough about the caller to write a log entry that a maintenance programmer can use to update or correct it. These are features that are not available in the simple-minded object systems that are used in "static" languages. | One more systematic approach to this (if you project gets big enough to | be in multiple files) is to use one of the DEFSYSTEM utilities that | manage the dependencies among source files. Put macros and defstructs in | their own files, and mark the dependencies. Reasonably complete cross-referencing function are available in the real Common Lisp environments that can tell you which functions need to be recompiled if you change a macro (and indirectly a defstruct). These features are enormously helpful in locating both the source file and the functions and macros calling and called from a function or macro. They can also help you build a patch file of the functions that have changed after a macro has been changed for compilation as a patch. Depending on how you store your source files, extracting individual functions for recompilation may be a problem or no problem at all. -- Erik Naggum, Oslo, Norway Act from reason, and failure makes you rethink and study harder. Act from faith, and failure makes you blame someone and push harder.