It seems that C has its own quasi-objects such as 'structs' that can be considered as objects (in the high-level way that we would normally think).
And also, C files themselves are basically separate "modules", right? Then aren't modules kind of like 'objects' too? I'm confused as to why C, which seems so similar to C++, is considered a low-level "procedural" language where as C++ is high-level "object-oriented"
*edit: (clarification) why and where, is the line drawn, for what an 'object' is, and isn't?
Best Answer
Let's together you and I read through the Wikipedia page on object oriented programming and check off the features of C-style structs that correspond to what is traditionally considered to be object-oriented style:
Do C structs consist of fields and methods together with their interactions? No.
Do C structs do any of these things in a "first class" way? No. The language works against you every step of the way.
Do C structs do this? No.
Do C structs do this? Yes.
No.
Can a struct itself send and receive messages? No. Can it process data? No.
Does this happen in C? No.
Are any of these features of C structs? No.
Precisely which characteristics of structs do you think are "object oriented"? Because I can't find any other than the fact that structs define types.
Now, of course you can make structs that have fields that are pointers to functions. You can make structs have fields that are pointers to arrays of function pointers, corresponding to virtual method tables. And so on. You can of course emulate C++ in C. But that is a very non-idiomatic way to program in C; you'd be better off just using C++.
Again, what characteristics of modules are you thinking of that makes them act like objects? Do modules support abstraction, encapsulation, messaging, modularity, polymorphism, and inheritance?
Abstraction and encapsulation are pretty weak. Obviously modules are modular; that's why they're called modules. Messaging? Only in the sense that a method call is a message and modules can contain methods. Polymorphism? Nope. Inheritance? Nope. Modules are pretty weak candidates for "objects".