Re:The Ten Commandments for C Programmers (1987)
by sigjuice on Saturday May 23, 2020 @06:48PM
(#23287289)
How does C provide ABI stability? If I send someone .o and .a files, I don’t think they can just use them in the general case.
[ Parent
| on HN ]
Re:The Ten Commandments for C Programmers (1987)
by CameronNemo on Sunday May 24, 2020 @03:02AM
(#23289734)
C does not provide ABI stability itself as a language, however the language does make it easier for libraries (including specific implementations of the standard library) to provide ABI stability.
Rust does not provide the facilities to write libraries with stable ABIs, and C++ libraries have to be written carefully to achieve ABI stability. More precisely, important C++ and Rust language features (templates and generics, respectively) conflict with the ability of providing ABI stability (at least it was thought so... Swift is novel in how it provides ABI stability guarantees for library writers alongside generics).