One of my favorite features of Ada 2012 are the design-by-contract checks taken from Eiffel[0]:
Preconditions: "a condition or predicate that must always be true just prior to the execution of some section of code or before an operation"[1]. It is up to the caller (client) to set up the preconditions and ensure that they are true before calling the code in question. If any preconditions are not met, it is the fault of the caller (client).
Postconditions: "a condition or predicate that must always be true just after the execution of some section of code or after an operation"[2]. The code in question guarantees that the postconditions will be true after the code is executed. If any postconditions are not met, it is the fault of the callee (supplier).
Invariants: conditions or predicates that "can be relied upon to be true during the execution of a program, or during some portion of it"[3]. Both parties must ensure the invariants hold.
These features make it very easy to determine where a bug is in the code and make it very explicit what is expected of the caller (client) and callee (supplier).
They act as run-time sanity checks and push Ada / SPARK code in the direction of Haskell function signatures and types. With proper preconditions, postconditions, and invariants in place I think it should be possible to implement a QuickCheck-style[4] testing system to provide some empirical checks if SPARK proof checking is not used.
I would love to see these design-by-contact features added to Rust, C++, and even C.
[0] https://www.eiffel.com/values/design-by-contract/introductio...
[1] https://en.wikipedia.org/wiki/Precondition
[2] https://en.wikipedia.org/wiki/Postcondition
[3] https://en.wikipedia.org/wiki/Invariant_(mathematics)#Invari...
[4] https://en.wikipedia.org/wiki/QuickCheck