Re:Object oriented programming with ANSI-C (1993)
by Roboprog on Saturday January 04, 2014 @12:49PM
(#7012020)
Also did an OOP emulation a few years earlier than this using Clipper 5, of all things. No structs, but you could make constants for array indices, and assign a closure/block to each array element, using the array as a virtual method table.
Of course, some in the company tried to pad their resumes with actual (gahd-awwwful) C++. Lovely jewels like this:
Guess they never heard of a virtual method. Then there's the fun of all the memory leaks from copy constructors and other silly C++ pitfalls.Simulated OOP in C is an interesting exercise. I suppose if I had not learned an OOP language other than C++ first, I would have thought C++ is just how (hard) it's supposed to be :-)