3 ms·
Having maintained a C++ API and ABI based on implementation inheritance with virtual functions, I have deep respect for both kinds of compatibility. Someone eve
by jwatte 10y ago
Having maintained a C++ API and ABI based on implementation inheritance with virtual functions, I have deep respect for both kinds of compatibility. Someone even used placement new to put objects with vtable pointers in shared memory, expecting destructors to work in a different process!
Check out the "fragile base class problem" some time for more things than can go wrong.
Something that want made explicit: If you support closed source, shipping binaries, then the ABI can't change, or you break all compiled binaries users have installed.
If rebuilding the world from source is an option, changing the ABI is an option.
(Introducing a new ABI for new subsystems is still OK - hence renaming libc when it changes)
(Say what you want about Microsoft, but COM solved that problem pretty well in the '90s...)
- teacup50 10y ago> If rebuilding the world from source is an option, changing the ABI is an option. It's an option ... but not a very good one. It tends to create an unstable environment that requires a centralized organization just to keep it working, precluding a healthy diverse software ecosystem. This is a major reason why it's very difficult to distribute binary packages when operating externally to the distribution packagers, and why commercial software distribution on Linux is a massive pain in the ass.