Вопрос

I keep reading that object-oriented programming can basically be done in any programming language, and that in order to do so, explicit language support is not required. I.e. one can write object-oriented programs in, say, plain C.

What good examples of OO design using a procedural language are there, apart from GTK+?

Which open source projects are good examples of procedural design, on the other hand? (preferably C)

Это было полезно?

Решение

In C, OO programming usually takes the form of calling particular initialization and cleanup functions on struct pointers, and for polymorphism, passing around structs of function pointers. One example I can think of offhand is KVM.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top