4 ms·
Encode the relevant parts of the specification into the type system. E.g. if the specification says that you must only call A after you've called B and C, make
by lmm 1y ago
Encode the relevant parts of the specification into the type system. E.g. if the specification says that you must only call A after you've called B and C, make B and C return some unique token type (with zero size at runtime) and make A require a parameter of that token type.