| ▲ | fhd2 6 hours ago | |
> Sounds like C. Data hiding is just one of the concepts of OOP. Polymorphism is another one. How that's implemented is another question. You can do OOP in plain C, several libraries kinda did that, like GTK. Other languages tried to support these concepts with less boilerplate, giving rise to classes and such. But OOP is not about language features, it's fundamentally a way of designing software. | ||
| ▲ | 1718627440 6 hours ago | parent [-] | |
Polymorphism is trivial in C and even less restrictive than in other OOP-first languages. The reason why GTK (actually GObject) is so overengineered is not due to classes, but because it allows to create classes and types at runtime. | ||