Re: deleting a class
Leon Bottou <[email protected]>
| Newsgroups | gmane.lisp.lush.devel |
|---|---|
| Message-ID | <[email protected]> |
On Friday 08 April 2005 02:03 pm, Ralf Juengling wrote: > I found that it's not possible to delete a class. > I suspect this is a precaution. > ? (delete myclass) If you delete the class, what should we do with the instances of this class used by other programs. We could delete them as well, but this might lead to an unwanted loss of information. > But then it should > not be allowed to redefine a class either: Redefining means creating a new class with the same name. If there were instances of the old class, these instances remain associated with the old class. You can still access the old class ] using the <classof> function. When no instances of the old class remain, the old class is simply garbage collected. Try this: ? (pretty (macro-expand (defclass foo object))) - L. > > *** delete : Cannot delete this object : ::class:myclass > Debug toplevel [y/N] ?n > ? (defclass myclass object > whatever) > = myclass > > > A simple solution might be to let defclass lock the > class symbol. > > Ralf > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Lush-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/lush-devel > > ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click