Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!mips!apple!rutgers!mcnc!rti!sas!sasdjb From: sasdjb@sas.UUCP (David Biesack) Newsgroups: comp.object Subject: Re: OOP in C Message-ID: <1391@sas.UUCP> Date: 19 Dec 89 19:39:26 GMT References: <3356@hydra.Helsinki.FI> <1691@mrsvr.UUCP> <1031@swbatl.UUCP> <1719@mrsvr.UUCP> Reply-To: sasdjb@sas.UUCP (David Biesack) Organization: SAS Institute Inc, Cary NC Lines: 30 I'm surprised nobody has mentioned Class, the oo preprocessor with which the Andrew system was developed at CMU. It supports single inheritance, overrides, and super methods. Class is fairly easy to use; I developed (yet-another) widget class hierarchy using it and had very few problems. It's not as full-fledged as C++, though, but it gets the job done. Class runs as a preprocessing step on a .H file which contains class declarations. This generates two include files, one #included for users of the class, one #include'd for the implementation of the methods. Except for the .H file, everything is standard C. Even the method "renaming" is usable, and debugging was straight forward. I haven't tried to use Class outside of the Andrew system, so I don't know how general purpose it is. Integrated with the Andrew system, the object code was dynamically loaded, so the first instantiation of a class instance loaded the class methods. My guess is that this behavior could be extracted out of the Class system (it may not actually be part of what Class does, anyway.) Anyone from CMU ITC know the answer? Class comes on the X Window System tape (X11R3) somewhere in the bowels of the contrib directory. The preprocessor is actually a very small C program (about 1000 lines, if I recall). djb -- David J. Biesack SAS Institute, Inc. rti!sas!sasdjb SAS Circle, Box 8000 (919) 467-8000 Cary, NC 27512-8000