Not all languages have objects, but all can call into a plain function.
C is lower level. Things are as fundamental as they can be - you're mostly passing around pointers here. Every language is ultimately aware of pointers.
C has a cross-platform binary interface. All standard compilers will produce the same libraries, which means it's easy to just share headers and libraries. C++ is a wild west.
It's easy to wrap C with objects, it's much harder to unwrap objects into functions.
You reasoning makes sense but how is C lower level than C++? IIRC (please correct me if I'm wrong) C++ still maintains Cs low level features while also including high level abstractions.
22
u/Dworgi Feb 17 '16
Bunch of reasons:
Not all languages have objects, but all can call into a plain function.
C is lower level. Things are as fundamental as they can be - you're mostly passing around pointers here. Every language is ultimately aware of pointers.
C has a cross-platform binary interface. All standard compilers will produce the same libraries, which means it's easy to just share headers and libraries. C++ is a wild west.
It's easy to wrap C with objects, it's much harder to unwrap objects into functions.