|
|
|
|
|
by unwind
3688 days ago
|
|
Maybe you can forgive C for the stupid header compilation model (why let the compiler do what you can make the programmer do by hand?). This model enables binary-only distribution of libraries, you get the code as a .a (or lib, .so, .dll or whatever) and the API declaration as a header file. You can write code against a library without having the library, using only the header. You can't do the final linking of course, but you can write the code. The alternative, I guess, would be to embed this information in the library itself, and have the compiler extract it, which sounds as if it would have been scary from a performance point of view 40 years ago (and also somewhat hard). |
|