zirias@
Developer
- Thread Starter
- #26
Yes, as already mentioned above ... although I'm not sure how exactly it could go wrong in practice, this is non-conforming code. Strictly speaking, passing an older/shorter version of the struct means passing a pointer to an incompatible type and all that C has to say about that is: Undefined behavior.Later, in code, you can handle compatibility gracefully.
Sure you handle breaking changes with library versioning. Typically, the major version number is part of yourOr you can use shared library versioning (isn't this what it is for?)
SONAME
(so the dynamic linker looks for it), then all you have to do on a breaking change is bump the major version.But: You certainly don't want to do that for every added feature. It requires all consumers to at least re-build. I really want to avoid breaking the ABI unless it's really necessary.
That said, I'm almost done implementing my idea above (fully opaque options objects, but keep just one thread-local instance of each). I guess that will be quite usable, let's see