Object-oriented Programming with ANSI-C (1993) [pdf]
As far as I can tell, the author says that &quot;ANSI-C is a full-scale object-oriented language&quot; in a slightly sarcastic tone, as there&#x27;s nothing particular to OOP languages that you can&#x27;t do in C. But I&#x27;ve heard many people say (and mean it) they do OOP in C.<p>I find it a bit dubious to claim you&#x27;re doing OOP in C, considering that C does not have objects. And I find it twice as dubious because you can translate any FP&#x2F;OOP code to procedural C; at this rate, you can start claiming that your x86 binary is OOP.<p>I often hear that &quot;FILE is an object, it&#x27;s exactly as if C++ had class FILE {...}, the class is just syntactic sugar, the result of the compilation is identical&quot;.<p>This is false, as it&#x27;s not &quot;just syntactic sugar&quot;. A C++ class binds a function to a specific struct, and the function can &quot;belong&quot; to no other struct. When doing OOP you have to choose - function F belongs to either object A or to object B. It can&#x27;t belong to both. Which is why OOP has endlessly silly discussions about whether class Car should Turn() the class Wheel, or should the class Wheel Turn() class Car. Or should we refactor it into class SteeringWheel that will Turn() both Car and Wheel.<p>This is not a thing in C. Linus Torvalds can add a function F that operates on the internals of both FILE and DIR at the same time, for example, and suddenly it&#x27;s less clear who &quot;owns&quot; F and which one is the object.<p>Which is why, personally, I don&#x27;t think doing dynamic dispatch with void* in C can be qualified as OOP, it&#x27;s just a pattern that&#x27;s been there ever since the language was introduced. It&#x27;s only after you add specific OOP features to the language that it devolves into an OOP language.