Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!swbatl!uucibg From: uucibg@swbatl.UUCP (3929) Newsgroups: comp.object Subject: Re: OOP in C Message-ID: <1038@swbatl.UUCP> Date: 13 Dec 89 18:28:39 GMT References: <3356@hydra.Helsinki.FI> <1691@mrsvr.UUCP> <1031@swbatl.UUCP> Reply-To: uucibg@swbatl.UUCP (Brian Gilstrap - UCI - 5-3929) Organization: Southwestern Bell Tele. Co. - Advanced Technology Lab - St. Louis Lines: 34 In article wiseb@turing.cs.rpi.edu (G. Bowden Wise) writes: >Have you implemented a 'super' construct so that you can override inherited >methods in the derived class and use the super method instead? >************************************************************ >* Bowden Wise (wiseb@turing.cs.rpi.edu) * >* RPI Computer Science Department, Troy, NY 12180 * >************************************************************ Yes. IMHO, It would be a pretty brain-dead OOP system if it didn't have this. In Coo (the origins of the name I'm trying to lose into the mists of time :-), you would invoke use the 'super' construct inside a method via: ... something = ask( int, super, doSomethingWhichReturnsIntVal, ( myArg ) ); ... This does what you expect (if you are familiar with Objective-C, Complete C, etc). Basically, it starts the search for the method with the super-class methods of the current object. Er, let's try that again. If I use super in a method of class Foo and Foo's super-class is Bar, then the search for method "doSomethingWhichReturnsIntVal" will start with the methods of class Bar. Thanks, -------------------------------------------------------------------------------- Brian R. Gilstrap ...!{ texbell, uunet }!swbatl!uucibg OR uucibg@swbatl.UUCP One Bell Center +---------------------------------------------------------- Rm 17-G-4 | "Winnie-the-Pooh read the two notices very carefully, St. Louis, MO 63101 | first from left to right, and afterwards, in case he had (314) 235-3929 | missed some of it, from right to left." -- A. A. Milne -------------------------------------------------------------------------------- Disclaimer: Me, speak for my company? You must be joking. I'm just speaking my mind.