6 ms·
>I hope for a future where programmers will be able to specify all contracts, invariants, etc. in code Theoretically is this even possible? We simulate this wi
by javajosh 11y ago
>I hope for a future where programmers will be able to specify all contracts, invariants, etc. in code
Theoretically is this even possible? We simulate this with tests, and code-coverage analysis, but in the end all programs deal with unknown inputs, by definition.
- asanagi 11y agoA program where all the inputs are known is called a demo.
- sirseal 11y agoThere's certainly limits. Compilation-time type safety can only guarantee the absence of certain errors or presence of certain behaviours. Any question that can be reduced to the halting problem is something that cannot be automatically verified. However, there's lots of interesting and useful stuff that is not reducible to this problem. Such as "is this input really an integer?" (cough cough, dynamic languages)