3 ms·
Figuring out how to make a computer decide that one API is compatible with another would be bloody hard. I hesitate to say 'impossible' because today, I can sub
by hluska 8y ago
Figuring out how to make a computer decide that one API is compatible with another would be bloody hard. I hesitate to say 'impossible' because today, I can subscribe to much of what I deemed impossible two decades ago.
If you can figure this out, it would be an absolutely amazing feat. Best of luck!
- simplecomplex 8y agoFully typed functional languages (Haskell for example) have this ability.
- dagenix 8y agoI'm not sure that is correct. A function that takes no arguments and returns 2 and a function that takes no arguments and returns 3 both have the same type signature. I'm not super strong on the theoretical side of computer science, but, my understanding is that the only general solution to determining if our function returns 2 or 3 (or some other integer) is equivalent to the halting problem.
- simplecomplex 8y agoYes, obviously. The API is the same though. The interface.
- dagenix 8y agoThe signature of the interface is the same, yes. But, if the behavior changes it can still break users. I'm fully in support of strong typing and SemVer and all that good stuff - I was just responding to your comment which I interpreted to mean that a language like Haskell has a full solution to the problem of breakage, which I don't believe it does. It's certainly in a better position that many other language in the types of breakage it can detect just from the function signatures, however.
- badsectoracula 8y agoWhen it comes to native libraries at least, API laboratory has some tools to help: https://abi-laboratory.pro/ https://abi-laboratory.pro/ It isn't perfect, but it can largely show when things break (or might break). As an example here is the report for curl: https://abi-laboratory.pro/index.php?view=timeline&l=curl https://abi-laboratory.pro/index.php?view=timeline&l=curl