3 ms·
> the current prevalent C/C++ ABI is not powerful enough Can complex binary interfaces be useful though? People still write software in C. Not because it's a
by matheusmoreira 6y ago
> the current prevalent C/C++ ABI is not powerful enough
Can complex binary interfaces be useful though?
People still write software in C. Not because it's a particularly good language but because there is a simple binary interface: symbols and calling conventions. Libraries built from this code can be used from virtually every other language. People actually rewrite stuff in C just to obtain this property.
Complex binary interfaces restrict software reusability. If it's too complex, it will be extremely difficult to build and maintain the links between programs.
Modern languages approach this problem by getting rid of the links. All code and interfaces are visible to the compiler, the resulting binary image is a perfectly optimized version of the whole program and nobody cares about the machinery the compiler outputs. Nothing else can interface with these programs though... I don't see people calling Rust functions from Python without using the C ABI.
- choeger 6y agoI don't think that binary interfaces should be overly complex. But I do think that we need a replacement for C at some point. And that replacement should not only be designed better, but also more powerful, yet still yield efficient code. Hence I conclude that we need some form of monomorphisation or specialisation ABI. Maybe I will some day write a blog about this...