Murphy’s Law asserts that if something has the potential to go awry, it inevitably will. The value of an API stems from its utilization, and an increased user base enhances its overall worth. APIs ought to be constructed with a focus on loose coupling, allowing providers and consumers of services greater independence and autonomy for adaptation. Hyrum’s Law serves as a cautionary note, highlighting the likelihood that someone may rely on observable behavior in addition to written contracts.
The API’s name, input and output data types collectively define the published contract, while the tangible values of input and output data dictate the observable behavior. A singular API can manifest in multiple implementations or none at all, existing in an abstract form, embodied through distinct libraries that share a common programming interface. A recent illustration of this was evident in GitHub’s decision to update archive builds, resulting in disruptions for everything dependent on checksums. Also see https://github.blog/changelog/2023-01-30-git-archive-checksums-may-change/