Date: Tue, 05 Nov 1996 21:56:46 GMT Server: NCSA/1.5 Content-type: text/html Last-modified: Mon, 05 Aug 1996 04:34:02 GMT Content-length: 1684
Here is a small collection of possibly-interesting tidbits relating to object-oriented programming in C. Some of these are written by me, others I've pulled off the net.
The idea is to use function pointers to implement dynamic binding in order to write easily-extensible code as well as to effect data and code abstraction through well-defined interfaces (in this case, function signatures). (Follow all that??) This method is similar to using virtual functions and subtyping in C++, but it's more flexible: there's no difference between member functions and non-member functions, and the subtyping mechanism does not depend on the language's builtin dynamic memory allocation mechanism (i.e., operator new). And, of course, it doesn't require C++, so you don't need to pay for what you don't want.
Here are some links.
update: The last project I worked on that required creating new code from scratch (it was a simulator for an architecture class project) was done in C++, using its inheritance method. Apparently, I don't practice what I preach. Oh well.
Comments/flames welcome: gid@cs.wisc.edu