{ |one, step, back| } 1 of 1 article WikiSyndicate: full/short

Polyglot Polymorphism   23 May 03
[ print link all ]
In an email converversion on the CLUG (www.clug.org) mailing list some time ago, we got on the topic of doing Object Oriented program (with runtime polymorphism) in a non-OO language like C. What would it take, what would the code look like and is it worth it?

Using the standard shapes example, I posted some code in C showing how to do runtime polymorphism using pointers to functions. I also include C++ and Java examples. Then everybody got in the act and we ended up with this (onestepback.org/articles/poly).

Some of the source files are missing, and I’ll replace them when I can. In the meantime, enjoy.

 

Formatted: 07-Oct-08 22:45
Feedback: jim@weirichhouse.org