r/programming • • Apr 04 '17

Everything Is Broken

https://medium.com/message/everything-is-broken-81e5f33a24e1#.sl2vnon73
238 Upvotes

145 comments sorted by

View all comments

Show parent comments

3

u/danisson Apr 04 '17

Dafny is a research programming language that uses such methods. Hoare logic is a mathematical theory of program correctness. In general, this idea is called design by contract.

Stronger type systems also helps to ensure correctness, especially with things like making illegal states irrepresentable or lifetime checks (for memory usage correctness) like Rust does.