4 ms·
You got it yes. And very few Software Engineer understand that unfortunately. The reason C is so successful is named ABI. C (and C++ to some extend) can be us
by adev_ 7y ago
You got it yes. And very few Software Engineer understand that unfortunately.
The reason C is so successful is named ABI.
C (and C++ to some extend) can be used to produce library that can be used from any higher level language in existence. And this is strictly required in the heterogeneous world we live in.
If you have to write a system components, long lifetime, implementing a protocol / database / format / any-low-level-staff: You do not have choice, safety or not. It is going to be C or C++, because it is the only thing reusable in most other environment.
Python has pybind11, Java has JNI, Lua operate beautifully with C/C++, Node is itself C++, go has cgo, Ruby is in C, any proper programming language can interface with C or C++.
They are the only languages allowing that, and that is why they are still alive, very well alive, even if they are unsafe.
As long as new language authors will be more obsessed about supporting new fancy feature instead of providing a well defined ABI (C compatible). The situation will not change.
Rust might be the new comer in this area that has its chance. But for the time being, it is still too young: you have to map every Rust API to a C one manually to make it exportable.