Path: utzoo!attcan!uunet!know!sdd.hp.com!wuarchive!psuvax1!rutgers!bellcore-2!bellcore!dsm From: dsm@ctt.bellcore.com (David S. Miller) Newsgroups: comp.lang.lisp Subject: CLOS questions Message-ID: <28175@bellcore.bellcore.com> Date: 24 Oct 90 19:15:31 GMT Sender: news@bellcore.bellcore.com Organization: Computer Technology Transfer Division, Bellcore, Piscataway, NJ Lines: 58 I'm thinking of using CLOS to implement a project, and I have a few questions about it. I apologize in advance if any of these questions have been asked before, or are inappropriate for this newsgroup. (1) Are there any public domain (ftp'able) versions of CLOS out there? (for a Sun 3)? (2) Is it possible for an object to be an instance of two disjoint classes? (e.g.) Supposing I have classes representing groups of people such as employees, students, and athletes. What if I want to represent an individual student-employee, or student-athlete, without creating a new class? As far as I can tell, it doesn't seem possible for an object to be an instance of more than one class. Yet, it seems inappropriate to have to create a new class every time you want a new instance to inherit attributes from more than one existing class. (3) Is there any mechanism in CLOS for automatically classifying an object into a class based on attribute values? (e.g.) In the previous example, suppose the 'student' class has an "athletic-prowess' slot. If the value of that slot was set to 'high for a particular instance, then I'd want that instance to be classified into the 'athlete' class as well. The best way that I can think of to handle this is to define a method such as: (defmethod (setf athletic-prowess) ((new-value (eql 'high)) ...) ...classify this instance as an athlete... ) Is there a better way to do this? Thanks in advance for any help on these matters. I will post summaries of responses e-mailed to me that are of general interest. David Miller |INTERNET: dsm@ctt.bellcore.com Bellcore - RRC 1H206 |UUCP: ..!bellcore!ctt!dsm 444 Hoes Lane |PHONE: (201) 699-4533 Piscataway, NJ 08854-4182 | -- David S. Miller |INTERNET: dsm@ctt.bellcore.com Bellcore - RRC 1H206 |UUCP: ..!bellcore!ctt!dsm 444 Hoes Lane |PHONE: (201) 699-4533 Piscataway, NJ 08854-4182 |