[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Clisp question

Marcus Daniels writes:
> Tobias> For some reason, clisp doesn't seem to let you redefine a
> Tobias> class once it's defined
> CLISP's CLOS doesn't support class redefinition 
> (UPDATE-INSTANCE-FOR-REDEFINED-CLASS, etc).  Perhaps you could use PCL
> for development...

Definitely not a good advice for people which have only 8 MB or less of
RAM. Maybe doable if you have 32 MB and do not have lots of code written
in CLOS.

Instead, consider just throwing away the class' symbol:

> (defclass bar () ((x)) )
> (unintern 'bar)
> (defclass bar () ((y)) )

Of course, you have to keep in mind that the new `bar' is another symbol
(in memory) than the old `bar', thus you have to reload all of your
code which defines a subclass of `bar' or a method on `bar'.