Re: deleting a class
Raymond Martin <[email protected]>
| Newsgroups | gmane.lisp.lush.devel |
|---|---|
| Message-ID | <[email protected]> |
Ralf, > I found that it's not possible to delete a class. Of course you cannot delete a class. A class is a declaration that is used to instantiate objects. You delete objects, not classes. > I suspect this is a precaution. But then it should > not be allowed to redefine a class either: > > ? (delete myclass) > > *** delete : Cannot delete this object : ::class:myclass > Debug toplevel [y/N] ?n Try ? (setq myclass-instance (new myclass)) ... ? (delete myclass-instance) ? () returns nil. Object was deleted from memory. > ? (defclass myclass object > whatever) > = myclass > > > A simple solution might be to let defclass lock the > class symbol. > That does not make sense. If you were able to that then deleting a class would result in no class definition. Which would mean no class and no objects. Perhaps you should freshen up on object oriented programming because this is basic stuff you need to know before doing it. Raymond ------------------------------------------------------- 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