From: Bruno H. <br...@cl...> - 2017-08-04 01:33:07
|
Hi Sam, > > I don't know how to modify the CLOS so that it considers two separate > > worlds of classes: the compilation environment and the evaluation > > environment. > > You can have a "delenda" list during file compilation (bound in a > compilation unit), add to it all the definitions created while compiling > and then kill everything on the list at the end of the compilation unit. This approach will not behave well in the (quite common) case that the user 1. creates a file foo.lisp that defines a class X. 2. loads the file 3. modifies the file foo.lisp with incompatible changes 4. loads the file again, which fails due to mistakes in the file. Then he will have lost the definition of class X in memory, and the one in the file is non-functional. Not very desirable. I think the only reasonable approach is to store class definitions of the compilation environment in a different place than the class definitions of the evaluation environment. But things get tricky because parts of the classes are common, and you have methods such as CLASS-DIRECT-SUBCLASSES. Bruno |