3 ms·
Personally, I would far prefer a strong contracts system over semantic versioning. The ability to say "I rely on these N interfaces to present accept these argu
by malandrew 12y ago
Personally, I would far prefer a strong contracts system over semantic versioning. The ability to say "I rely on these N interfaces to present accept these argument types and return these types, and here are some test arguments and the values I expect returned" to be a much better way of describing what you rely on. Even better is that by defining things in terms of contracts, you should be able to replace dependencies with any module that matches the contract you require.
In general, it's always better to have a computer enforced standard over a human enforced one. Semantic versioning can just become human readable sugar over a set of contractual expectations.
- jahewson 12y agoUnless you checked every possible result for every possible function call you use then the 3rd party library could have been changed in such a way which would break your program. There's no way to prevent such situation in general, e.g when the input value space is non-finite. Other kinds of specification would seem very hard to test, for example rendering a 3D scene, if we used a bitmap as test data then we'd get false positives when the rendering is improved in some minor way, and the spec will fail, we'd need to use some perceptual metric for image similarity instead. Version numbers aren't so bad, given their ease of use.